Loading js/drupal.single_datetime.es6.js +6 −1 Changes for js/drupal.single_datetime.es6.js: 6 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -99,6 +99,8 @@ // Set the hour format. const formatTime = hourFormat === "12h" ? "h:i A" : "H:i"; const customFormat = input.data('customFormat'); const inline = input.data("inline"); const mask = Boolean(input.data("mask")); Loading @@ -122,6 +124,9 @@ input.data("allowTimes") ); } if (typeof customFormat !== 'undefined') { format = customFormat; } $(`#${input.attr("id")}`).datetimepicker({ format, Loading Loading @@ -157,7 +162,7 @@ } // Explicitly set locale. Does not work with passed variable // in setttings above. // in settings above. $.datetimepicker.setLocale(lang); }); } Loading js/drupal.single_datetime.js +7 −1 Changes for js/drupal.single_datetime.js: 7 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -104,6 +104,8 @@ // Set the hour format. var formatTime = hourFormat === "12h" ? "h:i A" : "H:i"; var customFormat = input.data('customFormat'); var inline = input.data("inline"); var mask = Boolean(input.data("mask")); Loading @@ -125,6 +127,10 @@ allowTimes = SingleDatetimeAllowTimes(input.data("allowedHours"), input.data("allowTimes")); } if (typeof customFormat !== 'undefined') { format = customFormat; } $("#" + input.attr("id")).datetimepicker({ format: format, formatTime: formatTime, Loading Loading @@ -159,7 +165,7 @@ } // Explicitly set locale. Does not work with passed variable // in setttings above. // in settings above. $.datetimepicker.setLocale(lang); }); } Loading src/Element/SingleDateTime.php +1 Changes for src/Element/SingleDateTime.php: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -94,6 +94,7 @@ class SingleDateTime extends FormElement { 'data-inline' => !empty($element['#inline']) ? 1 : 0, 'data-mask' => !empty($element['#mask']) ? 1 : 0, 'data-datetimepicker-theme' => $element['#datetimepicker_theme'], 'data-custom-format' => $element['#custom_format'] ?? NULL, ]; // Year start. Loading Loading
js/drupal.single_datetime.es6.js +6 −1 Changes for js/drupal.single_datetime.es6.js: 6 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -99,6 +99,8 @@ // Set the hour format. const formatTime = hourFormat === "12h" ? "h:i A" : "H:i"; const customFormat = input.data('customFormat'); const inline = input.data("inline"); const mask = Boolean(input.data("mask")); Loading @@ -122,6 +124,9 @@ input.data("allowTimes") ); } if (typeof customFormat !== 'undefined') { format = customFormat; } $(`#${input.attr("id")}`).datetimepicker({ format, Loading Loading @@ -157,7 +162,7 @@ } // Explicitly set locale. Does not work with passed variable // in setttings above. // in settings above. $.datetimepicker.setLocale(lang); }); } Loading
js/drupal.single_datetime.js +7 −1 Changes for js/drupal.single_datetime.js: 7 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -104,6 +104,8 @@ // Set the hour format. var formatTime = hourFormat === "12h" ? "h:i A" : "H:i"; var customFormat = input.data('customFormat'); var inline = input.data("inline"); var mask = Boolean(input.data("mask")); Loading @@ -125,6 +127,10 @@ allowTimes = SingleDatetimeAllowTimes(input.data("allowedHours"), input.data("allowTimes")); } if (typeof customFormat !== 'undefined') { format = customFormat; } $("#" + input.attr("id")).datetimepicker({ format: format, formatTime: formatTime, Loading Loading @@ -159,7 +165,7 @@ } // Explicitly set locale. Does not work with passed variable // in setttings above. // in settings above. $.datetimepicker.setLocale(lang); }); } Loading
src/Element/SingleDateTime.php +1 Changes for src/Element/SingleDateTime.php: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -94,6 +94,7 @@ class SingleDateTime extends FormElement { 'data-inline' => !empty($element['#inline']) ? 1 : 0, 'data-mask' => !empty($element['#mask']) ? 1 : 0, 'data-datetimepicker-theme' => $element['#datetimepicker_theme'], 'data-custom-format' => $element['#custom_format'] ?? NULL, ]; // Year start. Loading