Skip to content

Instantly share code, notes, and snippets.

@steffenr
Last active October 10, 2015 19:48
Show Gist options
  • Save steffenr/3741573 to your computer and use it in GitHub Desktop.
Save steffenr/3741573 to your computer and use it in GitHub Desktop.
localize jqueryUI datepicker to german
if($('input.datepicker').length) {
$('.datepicker').datepicker({
dateFormat: 'dd.mm.yy',
monthNames: ['Januar','Februar','März','April','Mai','Juni','Juli','August','September','Oktober','November','Dezember'],
dayNames: ['Sonntag', 'Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag','Samstag'],
dayNamesMin: ['So', 'Mo', 'Die', 'Mi', 'Do', 'Fre', 'Sa']
});
}
@yannickoo
Copy link

The check for length greater that zero is not necessary, you can remove ">0" :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment