Skip to content

Commit

Permalink
IBX-3534: Date picker seconds configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
bozatko committed Dec 18, 2024
1 parent 4ae54ca commit 94924e5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/bundle/Resources/public/js/scripts/admin.picker.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -38,6 +39,7 @@
flatpickrConfig: {
...pickerConfig,
defaultDate,
enableSeconds,
...customConfig,
},
});
Expand Down

0 comments on commit 94924e5

Please sign in to comment.