diff --git a/circ/circulation.pl b/circ/circulation.pl index 61065c726d..7b35a8c860 100755 --- a/circ/circulation.pl +++ b/circ/circulation.pl @@ -627,7 +627,7 @@ $template->param( debt_confirmed => $debt_confirmed, SpecifyDueDate => $duedatespec_allow, PatronAutoComplete => C4::Context->preference("PatronAutoComplete"), - todaysdate => dt_from_string()->set(hour => 23)->set(minute => 59), + today_due_date_and_time => dt_from_string()->set(hour => 23)->set(minute => 59), restriction_types => scalar Koha::Patron::Restriction::Types->search(), has_modifications => $has_modifications, override_high_holds => $override_high_holds, diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt index 881b75c54d..4e22f8a3f1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt @@ -1083,7 +1083,8 @@ // On-site checkout function toggle_onsite_checkout(){ if ( $("#onsite_checkout").prop('checked') ) { - $("#duedatespec").val("[% todaysdate | $KohaDates with_hours => 1 %]") + const duedatespec_fp = document.querySelector("#duedatespec")._flatpickr; + duedatespec_fp.setDate("[% today_due_date_and_time | $KohaDates dateformat => 'iso', with_hours => 1 %]"); } }