Lines 127-133
Link Here
|
127 |
let refresh_max_date = 0; |
127 |
let refresh_max_date = 0; |
128 |
let disable_buttons = []; |
128 |
let disable_buttons = []; |
129 |
|
129 |
|
130 |
if( $(this).data("flatpickr-futuredate") === true ) { |
130 |
if( $(this).data("flatpickr-futureinclusive") === true |
|
|
131 |
|| $(this).data("flatpickr-futuredate") === true ) { |
131 |
let original_date = $(this).val(); |
132 |
let original_date = $(this).val(); |
132 |
if ( original_date ) { |
133 |
if ( original_date ) { |
133 |
original_date = Date_from_syspref( original_date ).getTime(); |
134 |
original_date = Date_from_syspref( original_date ).getTime(); |
Lines 140-149
Link Here
|
140 |
}]; |
141 |
}]; |
141 |
} |
142 |
} |
142 |
else { |
143 |
else { |
143 |
options['minDate'] = new Date().fp_incr(1); |
144 |
if( $(this).data("flatpickr-futureinclusive") === true ) { |
|
|
145 |
options['minDate'] = new Date().setHours(00, 00, 00, 00); |
146 |
} else { |
147 |
options['minDate'] = new Date().fp_incr(1); |
148 |
} |
144 |
} |
149 |
} |
|
|
150 |
|
145 |
disable_buttons.push(0); /* Yesterday */ |
151 |
disable_buttons.push(0); /* Yesterday */ |
146 |
disable_buttons.push(1); /* Today */ |
152 |
|
|
|
153 |
if ( $(this).data("flatpickr-futuredate") === true ) { |
154 |
disable_buttons.push(1); /* Today */ |
155 |
} |
147 |
} |
156 |
} |
148 |
if( $(this).data("flatpickr-pastinclusive") === true ) { |
157 |
if( $(this).data("flatpickr-pastinclusive") === true ) { |
149 |
options['maxDate'] = new Date(); /* Not today or hh:mm will be 00:00 */ |
158 |
options['maxDate'] = new Date(); /* Not today or hh:mm will be 00:00 */ |