Skip to content

Commit

Permalink
Merge pull request openfoodfoundation#6524 from ankis17/DatePickerTra…
Browse files Browse the repository at this point in the history
…nslation

Fixed Translation for DatePicker
  • Loading branch information
sauloperez authored Dec 14, 2020
2 parents f26507b + 377febd commit c79baea
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion app/assets/javascripts/admin/spree/base.js.erb
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down

0 comments on commit c79baea

Please sign in to comment.