Summary: | Booking dates should respect closed days | ||
---|---|---|---|
Product: | Koha | Reporter: | Martin Renvoize (ashimema) <martin.renvoize> |
Component: | Circulation | Assignee: | Martin Renvoize (ashimema) <martin.renvoize> |
Status: | ASSIGNED --- | QA Contact: | Testopia <testopia> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | aude.charillon, gmcharlt, koha, kyle.m.hall, marie.hedbom |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Bug Depends on: | 34440 | ||
Bug Blocks: | 36383 | ||
Attachments: | Bug 37363: Initial work on supporting closed days |
Description
Martin Renvoize (ashimema)
2024-07-15 15:01:38 UTC
Flatpickr doesn't appear to support this spanning functionality natively.. there are a few idea's here though: https://github.com/flatpickr/flatpickr/issues/955 This works from onDayCreate: ``` // Make closed days unclickable (while keeping them part of the range) if (date.getDay() === 0 || date.getDay() === 6) { dayElem.classList.add("closed-day"); // Remove the click event to disable the day dayElem.addEventListener('click', function(event) { event.stopImmediatePropagation(); }, true); } ``` I'll submit the patch once I've finished work on bug 34440 Created attachment 169687 [details] [review] Bug 37363: Initial work on supporting closed days This is just a proof of concept at this point.. we need api's for fetching regular and irregular closed days before we can fully impliment the functionality. This is of interest to a library we work with: they use the Tools > Calendar to mark closed days and would like to see those closed days greyed out when placing bookings. The main blocker here is the lack of API's for fetching calendar open/closed days. We need to work on that first and also consider how opening hours and days work together. |