Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to change the localization of the datepicker in a idealforms form? #143

Open
soulflyman opened this issue May 5, 2013 · 2 comments
Open

Comments

@soulflyman
Copy link

hi, i'm trying to change the localization of the datepicker with out any success.
cane some one please help me?

//eferdi

@elclanrs
Copy link
Owner

elclanrs commented May 6, 2013

It's a jquery ui date field. Try following code here http://jqueryui.com/datepicker/#localization

@Nejedlos
Copy link

For czech location is this code:

$.datepicker.regional['cs'] = {
closeText: 'Cerrar',
prevText: 'Předchozí',
nextText: 'Další',
currentText: 'Hoy',
monthNames: ['Leden','Únor','Březen','Duben','Květen','Červen', 'Červenec','Srpen','Září','Říjen','Listopad','Prosinec'],
monthNamesShort: ['Le','Ún','Bř','Du','Kv','Čn', 'Čc','Sr','Zá','Ří','Li','Pr'],
dayNames: ['Neděle','Pondělí','Úterý','Středa','Čtvrtek','Pátek','Sobota'],
dayNamesShort: ['Ne','Po','Út','St','Čt','Pá','So',],
dayNamesMin: ['Ne','Po','Út','St','Čt','Pá','So'],
weekHeader: 'Sm',
dateFormat: 'dd.mm.yy',
firstDay: 1,
isRTL: false,
showMonthAfterYear: false,
yearSuffix: ''};

$.datepicker.setDefaults($.datepicker.regional['cs']);

$("#datepicker").datepicker();

Paste it at the end of idealform script on the page after

var $myform = $('#my-form').idealforms(options).data('idealforms');

$('#reset').click(function(){ $myform.reset().fresh().focusFirst() });
$myform.focusFirst();

and of course you have to adjust it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants