Bug 35532: Remove shortcut buttons from flatpickr
It doesn't make sense to have the shortcut buttons in the range picker for bookings. This patch adds the ability to remove them entirely from display and uses that option in the bookings modal. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
parent
03b95cc32a
commit
fa745c3b1d
|
|
@ -181,6 +181,9 @@
|
|||
options['dateFormat'] = "Y-m-d H:i";
|
||||
options['altFormat'] = flatpickr_dateformat_string + " " + flatpickr_timeformat_string;
|
||||
}
|
||||
if ( $(input).data('flatpickr-disable-shortcuts') === true ) {
|
||||
options['plugins'] = [];
|
||||
}
|
||||
|
||||
let fp = $(input).flatpickr(options);
|
||||
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@
|
|||
<li>
|
||||
<div id="period_fields">
|
||||
<label class="required" for="period">Booking dates: </label>
|
||||
<input type="text" id="period" name="period" class="flatpickr" data-flatpickr-futuredate="true" required="required" disabled="true" autocomplete="off">
|
||||
<input type="text" id="period" name="period" class="flatpickr" data-flatpickr-futuredate="true" data-flatpickr-disable-shortcuts="true" required="required" disabled="true" autocomplete="off">
|
||||
<span class="required">Required</span>
|
||||
</div>
|
||||
<div class="hint">Select the booking start and end date</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue