scinote-web/app/assets/javascripts/global_activities/date_picker.js
Soufiane 1b34de37ef
CSP and inline js refactor [SCI-8118][SCI-8119] (#5206)
CSP and inline js refactor [SCI-8118][SCI-8119]
2023-05-03 11:31:17 +02:00

13 lines
369 B
JavaScript

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