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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/discrete_calendar.tt (-2 / +11 lines)
Lines 453-458 Link Here
453
            $("#openHour").prop('disabled', value);
453
            $("#openHour").prop('disabled', value);
454
            $("#closeHour").prop('disabled', value);
454
            $("#closeHour").prop('disabled', value);
455
            $("#EditRadioButton").parent().toggle(!value);
455
            $("#EditRadioButton").parent().toggle(!value);
456
457
            // clear some fields
458
            $("#to_date_flatpickr").val('');
459
            document.querySelector('#to_date_flatpickr')._flatpickr.set('minDate', date_obj);
460
            $("#copyto_from_flatpickr").val('');
461
            $("#copyto_to_flatpickr").val('');
456
        }
462
        }
457
463
458
        // This function gives css classes to each kind of day
464
        // This function gives css classes to each kind of day
Lines 714-720 Link Here
714
            });
720
            });
715
721
716
            // Flatpickrs for copy dates feature
722
            // Flatpickrs for copy dates feature
717
            $('#copyto_from_flatpickr').flatpickr();
723
            $('#copyto_from_flatpickr').flatpickr({
724
                onChange: function(selectedDates, dateStr, instance) {
725
                    document.querySelector('#copyto_to_flatpickr')._flatpickr.set('minDate', dateStr);
726
                }
727
            });
718
            $("#copyto_from_flatpickr").change(function() {
728
            $("#copyto_from_flatpickr").change(function() {
719
                $('#copyto_from').val(($(this).val()));
729
                $('#copyto_from').val(($(this).val()));
720
            });
730
            });
721
- 

Return to bug 17015