Javascript – How to localize the jQuery UI Datepicker

calendarjavascriptjquery-uijquery-ui-datepickerlocalization

I really need a localized dropdown calendar. An English calendar doesn't exactly communicate excellence on a Norwegian website 😉

I have experimented with the jQuery DatePicker, their website says it can be localized, however that doesn't seem to work.

I am using ASPNET.MVC, and I really want to stick to one javascript library. In this case jQuery.

The ajax toolkit calendar would be acceptable, if only it too would display Norwegian names.

Update: Awesome! I see I am missing the language files, a not so minor detail 🙂

Best Answer

For those that still have problems, you have to download the language file your want from here:

https://github.com/jquery/jquery-ui/tree/master/ui/i18n

and then include it in your page like this for example(italian language):

<script type="text/javascript" src="/scripts/jquery.ui.datepicker-it.js"></script>

then use zilverdistel's code :D