mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-01 02:03:22 +00:00
Introduce altInput for flatpickr date(time)picker
- altInput is used to display the date to the end user: this field must be i18nized - dateFormat is the date format used through the front and the backend
This commit is contained in:
@@ -9,7 +9,9 @@ $(document).ready(function() {
|
||||
fp.setDate(date, true);
|
||||
}
|
||||
window.FLATPICKR_DATE_DEFAULT = {
|
||||
dateFormat: Spree.translations.flatpickr_date_format,
|
||||
altInput: true,
|
||||
altFormat: Spree.translations.flatpickr_date_format,
|
||||
dateFormat: "Y-m-d",
|
||||
locale: I18n.locale,
|
||||
plugins: [
|
||||
ShortcutButtonsPlugin({
|
||||
@@ -25,7 +27,9 @@ $(document).ready(function() {
|
||||
{},
|
||||
window.FLATPICKR_DATE_DEFAULT,
|
||||
{
|
||||
dateFormat: Spree.translations.flatpickr_datetime_format,
|
||||
altInput: true,
|
||||
altFormat: Spree.translations.flatpickr_datetime_format,
|
||||
dateFormat: "Y-m-d H:i",
|
||||
enableTime: true,
|
||||
time_24hr: true,
|
||||
plugins: [
|
||||
|
||||
Reference in New Issue
Block a user