Merge pull request #7972 from jibees/#7928-transform-locale-for-flatpickr

Flatpickr only use language and not locale
This commit is contained in:
Matt-Yorkley
2021-07-26 18:31:14 +02:00
committed by GitHub
2 changed files with 2 additions and 1 deletions

View File

@@ -12,7 +12,7 @@ $(document).ready(function() {
altInput: true,
altFormat: Spree.translations.flatpickr_date_format,
dateFormat: "Y-m-d",
locale: I18n.locale,
locale: I18n.base_locale,
plugins: [
ShortcutButtonsPlugin({
button: [{

View File

@@ -1,5 +1,6 @@
:javascript
I18n.default_locale = "#{I18n.default_locale}";
I18n.base_locale = "#{I18n.locale.to_s.split('_').first}";
I18n.locale = "#{I18n.locale}";
I18n.fallbacks = true;
moment.locale([I18n.locale, 'en']);