Add a flatpickr plugin to attach 'id' attribute to input element

- As we use `altInput`, the original input is hidden. This plugin forward the `id` attribute of the original input to the input created on-the-fly and used by end user.
This commit is contained in:
Jean-Baptiste Bellet
2021-02-19 14:59:13 +01:00
parent 424067d2dd
commit 2a504f7359
2 changed files with 5 additions and 2 deletions

View File

@@ -39,6 +39,7 @@
//= require flatpickr/dist/l10n/sv
//= require flatpickr/dist/l10n/tr
//= require shortcut-buttons-flatpickr/dist/shortcut-buttons-flatpickr.min
//= require flatpickr/dist/plugins/labelPlugin/labelPlugin
// spree
//= require admin/spree/spree

View File

@@ -20,7 +20,8 @@ $(document).ready(function() {
}],
label: "or",
onClick: onClickButtons
})
}),
labelPlugin({})
]
}
window.FLATPICKR_DATETIME_DEFAULT = Object.assign(
@@ -39,7 +40,8 @@ $(document).ready(function() {
}],
label: "or",
onClick: onClickButtons
})
}),
labelPlugin({})
]
}
);