Skip to content
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

Open
michel-io opened this issue Sep 14, 2024 · 2 comments
Open

Grey out unavailable dates on booking #1598

michel-io opened this issue Sep 14, 2024 · 2 comments

Comments

@michel-io
Copy link

michel-io commented Sep 14, 2024

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

@alextselegidis
Copy link
Owner

Hello!

Thanks for submitting this.

Would it be possible to share an example including the provider and customer selected timezones?

Alex Tselegidis, Easy!Appointments Creator
Need a customization? Get a free quote!

@michel-io
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants