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 · 5 comments
Open

Grey out unavailable dates on booking #1598

michel-io opened this issue Sep 14, 2024 · 5 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

@Tembew
Copy link

Tembew commented Dec 17, 2024

Is there a fix? Still there even in demo I think.

@Tembew
Copy link

Tembew commented Dec 18, 2024

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!

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.

Screenshot 2024-12-18 182820
Screenshot 2024-12-18 182328
Screenshot 2024-12-18 182320
Screenshot 2024-12-18 182314

@Tembew
Copy link

Tembew commented Dec 19, 2024

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

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

3 participants