diff --git a/app/assets/javascripts/admin/spree/base.js.erb b/app/assets/javascripts/admin/spree/base.js.erb index 435ec6de4a7..5c285590021 100644 --- a/app/assets/javascripts/admin/spree/base.js.erb +++ b/app/assets/javascripts/admin/spree/base.js.erb @@ -127,7 +127,16 @@ $(document).ready(function() { nextText: Spree.translations.next, showOn: "focus" }); - + + $.datepicker.regional[I18n.locale] = { + prevText: Spree.translations.previous, + nextText: Spree.translations.next, + monthNames: Spree.translations.month_names, + dayNames: Spree.translations.abbr_day_names, + dayNamesMin: Spree.translations.abbr_day_names, + dateFormat: Spree.translations.date_picker + }; + $.datepicker.setDefaults( $.datepicker.regional[I18n.locale]); // Correctly display range dates $('.date-range-filter .datepicker-from').datepicker('option', 'onSelect', function(selectedDate) { $(".date-range-filter .datepicker-to" ).datepicker( "option", "minDate", selectedDate );