View | Details | Raw Unified | Return to bug 29500
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc (-3 / +14 lines)
Lines 90-97 Link Here
90
            let options = {};
90
            let options = {};
91
91
92
            if( $(this).data("flatpickr-futuredate") === true ) {
92
            if( $(this).data("flatpickr-futuredate") === true ) {
93
                options['minDate'] = new Date().fp_incr(1);
93
                let original_date = $(this).val();
94
                options['allowInvalidPreload'] = true;
94
                if ( original_date ) {
95
                    original_date = Date_from_syspref( original_date ).getTime();
96
                    let tomorrow = new Date().fp_incr(1).getTime();
97
98
                    options['enable'] = [function(date){
99
                        date = date.getTime();
100
                        if ( date == original_date ) return true;
101
                        if ( date >= tomorrow)       return true;
102
                    }];
103
                }
104
                else {
105
                    options['minDate'] = new Date().fp_incr(1);
106
                }
95
            }
107
            }
96
            if( $(this).data("flatpickr-pastinclusive") === true ) {
108
            if( $(this).data("flatpickr-pastinclusive") === true ) {
97
                options['maxDate'] = "today";
109
                options['maxDate'] = "today";
98
- 

Return to bug 29500