Datepicker jQuery UI ... set language

I tried to set Datepicker, like this:

<script type="text/javascript">
    $.datepicker.setDefaults($.datepicker.regional['nl']);
    $(function () {
        $("#tbDateDiagnostic").datepicker({
            numberOfMonths: 2,
            showButtonPanel: true,
            ateFormat: 'dd/mm/yy'
        });

        $("#tbDateSend").datepicker({
            numberOfMonths: 2,
            showButtonPanel: true,
            dateFormat : 'dd/mm/yy'
        });
    });
</script>

But all the time, the datepicker is in French and not in Dutch.

Did I do something wrong?

Answers


I'm guessing you forgot to include the localisation file:

<script src="https://jquery-ui.googlecode.com/svn-history/r3982/trunk/ui/i18n/jquery.ui.datepicker-nl.js"></script>

You may find other localisation files here: https://github.com/jquery/jquery-ui/tree/master/ui/i18n

Here's a demo: http://jsfiddle.net/repw4/418/


keith-wood is a good site with detailed examples. Try this:

$.localise('js/jquery.datepick', 'nl'); 
$('#tbDateSend').datepick('option', $.datepick.regional['nl']); 
$.datepick.setDefaults($.datepick.regional['']); 

Need Your Help

How can you turn an index array into a mask array in Numpy?

python arrays numpy where mask

Is it possible to convert an array of indices to an array of ones and zeros, given the range?

Saving UIView contents in iOS 4 with real size of the images inside (i.e. scale contentes up for save)

iphone uiview ios4 calayer retina-display

I have an UIView with many UIImageViews as subviews. The app runs on iOS4 and I use images with retina display resolution (i.e. the images load with scale = 2)