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