diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc
index edb7268c6b..e56932f88f 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc
+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc
@@ -133,6 +133,15 @@
}
}
},
+ onOpen: function( selectedDates, dateText, instance) {
+ var thisInput = instance.input;
+ let set_to_today = $(thisInput).data('flatpickr-set-to-today');
+ if ( set_to_today ) {
+ if ( thisInput.value === '' ) {
+ instance.setDate( new Date() );
+ }
+ }
+ },
onClose: function( selectedDates, dateText, instance) {
validate_date( dateText, instance );
var thisInput = instance.input;
diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc
index 14849ffe11..50d618f392 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc
+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc
@@ -167,9 +167,9 @@
[% END %]
[% ELSIF ( mv.type == 'date_field' ) %]
-
+
[% ELSIF ( mv.type == 'datetime_field' ) %]
-
+
[% END %]
[% IF subfield.kohafield == 'items.more_subfields_xml' %]