@@ -, +, @@ the item is booked for another user. booking should be defaulted to in the displayed date picker. before the booking starts and then checkout, you will be blocked. --- circ/circulation.pl | 2 +- koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc | 4 ++++ koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt | 4 ++-- 3 files changed, 7 insertions(+), 3 deletions(-) --- a/circ/circulation.pl +++ a/circ/circulation.pl @@ -425,7 +425,7 @@ if (@$barcodes) { $template_params->{getBarcodeMessageIteminfo} = $item->barcode; $template_params->{NEEDSCONFIRMATION} = 1; $confirm_required = 1; - if ( $needsconfirmation eq 'BOOKED_TO_ANOTHER' ) { + if ( $needsconfirmation_key eq 'BOOKED_TO_ANOTHER' ) { my $reduceddue = dt_from_string( $$needsconfirmation{$needsconfirmation_key}->start_date )->subtract( days => 1 ); $template_params->{reduceddue} = $reduceddue; --- a/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc @@ -181,6 +181,10 @@ options['dateFormat'] = "Y-m-d H:i"; options['altFormat'] = flatpickr_dateformat_string + " " + flatpickr_timeformat_string; } + let maxDate = $(input).data("flatpickr-maxdate"); + if( typeof maxDate !== 'undefined' ) { + options['maxDate'] = new Date(maxDate); + } let fp = $(input).flatpickr(options); --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt @@ -345,7 +345,7 @@ [% IF ( INVALID_DATE ) %]

- +

[% ELSE %] @@ -354,7 +354,7 @@ [% IF ( BOOKED_TO_ANOTHER ) %]

[% END %] --