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

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-curbside-pickups.tt (-5 / +7 lines)
Lines 331-336 Link Here
331
                }
331
                }
332
            });
332
            });
333
333
334
            const pickupDate_fp = document.getElementById("pickup-date")._flatpickr;
335
334
            $('#pickup-branch').on('change', function() {
336
            $('#pickup-branch').on('change', function() {
335
                let branchcode = $(this).val();
337
                let branchcode = $(this).val();
336
338
Lines 348-359 Link Here
348
                    $('#existing-pickup-warning').hide();
350
                    $('#existing-pickup-warning').hide();
349
                    $("#pickup-date,#pickup_date_item").show();
351
                    $("#pickup-date,#pickup_date_item").show();
350
                }
352
                }
353
354
                pickupDate_fp.set('disable', [function(date) {
355
                    return !policies[branchcode].slots_per_day.hasOwnProperty(date.getDay());
356
                }]);
357
351
            });
358
            });
352
359
353
            const pickupDate_fp = document.getElementById("pickup-date")._flatpickr;
354
            pickupDate_fp.set('disable', [function(date) {
355
                return !slots_per_day.hasOwnProperty(date.getDay());
356
            }]);
357
            pickupDate_fp.config.onClose.push(function( selectedDates, dateStr, instance ){
360
            pickupDate_fp.config.onClose.push(function( selectedDates, dateStr, instance ){
358
                /* Here we add an onClose event to the existing flatpickr instance */
361
                /* Here we add an onClose event to the existing flatpickr instance */
359
                /* It fires after the user has selected a date from the calendar popup */
362
                /* It fires after the user has selected a date from the calendar popup */
360
- 

Return to bug 32653