From 94924e54bc93e869393a4deb69a273ac6c2e8daf Mon Sep 17 00:00:00 2001 From: Aleksandra Bozek Date: Wed, 18 Dec 2024 13:35:32 +0100 Subject: [PATCH] IBX-3534: Date picker seconds configuration --- src/bundle/Resources/public/js/scripts/admin.picker.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/bundle/Resources/public/js/scripts/admin.picker.js b/src/bundle/Resources/public/js/scripts/admin.picker.js index bc0fc6754a..6e449d44f0 100644 --- a/src/bundle/Resources/public/js/scripts/admin.picker.js +++ b/src/bundle/Resources/public/js/scripts/admin.picker.js @@ -21,6 +21,7 @@ const formInput = field.querySelector(SELECTOR_FORM_INPUT); const pickerInput = field.querySelector(SELECTOR_PICKER_INPUT); const customConfig = JSON.parse(pickerInput.dataset.flatpickrConfig || '{}'); + const enableSeconds = formInput.dataset.seconds === '1'; let defaultDate; if (formInput.value) { @@ -38,6 +39,7 @@ flatpickrConfig: { ...pickerConfig, defaultDate, + enableSeconds, ...customConfig, }, });