aboutsummaryrefslogtreecommitdiffstats
path: root/app/assets/javascripts/public/jquery.ui.datepicker-i18n.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/public/jquery.ui.datepicker-i18n.js')
-rw-r--r--app/assets/javascripts/public/jquery.ui.datepicker-i18n.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/app/assets/javascripts/public/jquery.ui.datepicker-i18n.js b/app/assets/javascripts/public/jquery.ui.datepicker-i18n.js
index 3d0d55b46..b7748a77a 100644
--- a/app/assets/javascripts/public/jquery.ui.datepicker-i18n.js
+++ b/app/assets/javascripts/public/jquery.ui.datepicker-i18n.js
@@ -53,7 +53,14 @@ jQuery(function($){
monthNamesShort: $.datepicker.regional[ $('html').attr('lang') ].monthNamesShort,
monthNames: $.datepicker.regional[ $('html').attr('lang') ].monthNames
} );
- $(element).datepicker("setDate", $.datepicker.parseDate('yy-mm-dd', $(element).val() ) );
+ if ($(element).val().indexOf('/') >= 0)
+ {
+ $(element).datepicker("setDate", $.datepicker.parseDate('dd/mm/y', $(element).val() ) );
+ }
+ else
+ {
+ $(element).datepicker("setDate", $.datepicker.parseDate('yy-mm-dd', $(element).val() ) );
+ }
});
$("form").submit(function(event) {