scinote-web/app/assets/javascripts/global_activities/date_picker.js
Soufiane 77de460182
Due date flyout on dashboard calendar [SCI-8600] (#5554)
* Change the scope of the DatePicker datetime format in global activities [SCI-8600]
2023-06-09 09:24:32 +02:00

14 lines
423 B
JavaScript

/* global I18n */
(function() {
$('.datetime-picker-container').each(function() {
const id = $(this).data('id');
if (id) {
const dt = $(`#calendar-${id}`);
const useCurrent = $(this).data('use-current');
const formatJS = $(this).data('datetime-picker-format');
dt.datetimepicker({
useCurrent, ignoreReadonly: true, locale: I18n.locale, format: formatJS
});
}
});
}());