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

Picked date defer 1 day to saved date #7

Open
PierAlbertoPierini opened this issue Jul 26, 2023 · 3 comments
Open

Picked date defer 1 day to saved date #7

PierAlbertoPierini opened this issue Jul 26, 2023 · 3 comments

Comments

@PierAlbertoPierini
Copy link

When utilizing flatpickr with the 'Only Date' option selected, the saved date in the database is one day before the date chosen. For instance, if you choose the date 2023-07-26, it will be saved in the database as 2023-07-25. However, when the 'Only Date' option is not chosen, the date saved is accurate and reflects the selected date without any alterations.

@ghost
Copy link

ghost commented Sep 25, 2023

I can confirm this. When 'Only Day' is selected for a Flatpickr field, the day that is saved in the database is one day in the past.

@stevenolen
Copy link

stevenolen commented Sep 1, 2024

I'm not sure how to fix this, but it appears to be based on timezone. "only date" uses the UTC representation of 2024-01-01 00:00:00, which depending on your current timezone, is actually 2023-12-31.

@cfredericksen
Copy link

I can confirm this too. I cannot figure out a workround either.

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