Skip to content

Commit

Permalink
SAK-39949 - Datepicker on profile is always on english format (sakaip…
Browse files Browse the repository at this point in the history
  • Loading branch information
SedueRey authored and ern committed May 8, 2018
1 parent eb331fd commit 772a108
Showing 1 changed file with 19 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,20 +122,25 @@
http://jqueryui.com/demos/datepicker/
*/
$(document).ready(function(){

$('.datePicker').datepicker({
changeYear: true,
yearRange: '-100:+1',
dateFormat: 'dd MM yy',
defaultDate: new Date(),
hideIfNoPrevNext: true,
maxDate: new Date(),
showOn: 'both',
buttonImage: '/library/image/silk/calendar.png',
buttonText: '',
buttonImageOnly: true
});

// Unified this with the rest of the sakai tools
$.getScript("/library/js/lang-datepicker/lang-datepicker.js" )
.done(function( script, textStatus ) {
$.datepicker.setDefaults($.datepicker.regional[sakai.locale.userLanguage]);
$('.datePicker').datepicker({
changeYear: true,
yearRange: '-100:+1',
defaultDate: new Date(),
hideIfNoPrevNext: true,
maxDate: new Date(),
showOn: 'both',
buttonImage: '/library/image/silk/calendar.png',
buttonText: '',
buttonImageOnly: true
});
})
.fail(function( jqxhr, settings, exception ) {
console.error(exception);
});

$('.sakai-wicket-iconwithtooltip').cluetip({
local: true,
Expand Down

0 comments on commit 772a108

Please sign in to comment.