-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Grey out unavailable dates on booking #1598
Comments
Hello! Thanks for submitting this. Would it be possible to share an example including the provider and customer selected timezones?
|
I noticed this specifically in the -5 time zone (America/Havana) I was working in the early morning and noticed that the json that gives the list of blocked dates was giving the previous day, but the calendar was not blocking it. and when you see the code I sent, notice that the method it uses is that you map the dates that come in as string to date objects, and in the process the object is created in UTC |
Is there a fix? Still there even in demo I think. |
these are from the demo. limited to only available on tuesdays but doesn't grey out monday and skips a tuesday. Timezone was (-5:00) havana. Changing the computer time to UTC gives the right days. |
For anyone who ends up here, there's discussion here https://groups.google.com/g/easy-appointments/c/_pqPjjkaazw/m/lNBhG7r7BAAJ and I think same issue in other threads there. The fix hasn't worked for me but looking into it |
the file it's assets/js/http/booking_http_client.js
on function applyUnavailableDates the code goes
// Grey out unavailable dates. $selectDate[0]._flatpickr.set( 'disable', unavailableDates.map((unavailableDate) => new Date(unavailableDate)), );
when graying out unavailable dates on booking, the dates are mapped on UTC, and that causes issues for negative timezones
The text was updated successfully, but these errors were encountered: