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

Date Set To Previous Day with YYYY-MM-DD Format #446

Open
lynnfaraday opened this issue Jan 3, 2021 · 3 comments
Open

Date Set To Previous Day with YYYY-MM-DD Format #446

lynnfaraday opened this issue Jan 3, 2021 · 3 comments

Comments

@lynnfaraday
Copy link

lynnfaraday commented Jan 3, 2021

When I use the format "YYYY-MM-DD", the calendar picker will actually set the calendar to the previous day. This doesn't seem to happen with other formats. For example:

         <b>YYYY-MM-DD</b> <PikadayInput @value="2021-01-13"  @format="YYYY-MM-DD" />          
         
         <br/>

         <b>YYYY/MM/DD</b> <PikadayInput @value="2021/01/13"  @format="YYYY/MM/DD" />          
         
         <br/>
         
         <b>MM-DD-YYYY</b> <PikadayInput @value="01-13-2021"  @format="MM-DD-YYYY" />    

Gives me this:

image

The first picker is showing 1/12 instead of the specified date of 1/13.

I'm using version 3.0.0

@lynnfaraday
Copy link
Author

Follow up: My friend in the UK tested this same code and saw the correct date, even for the YYYY-MM-DD format. So maybe it's somehow related to the user's timezone or something?

@bekah-cheek-ao
Copy link

Thank you for reporting this! I thought I was totally losing it when I found this behavior in my app.

Here's a +1 on seeing this behavior. I'm in Mountain Daylight Time (GMT-6). For the time being, I'm working around this by formatting my dates using YYYY/MM/DD instead of YYYY-MM-DD.

@BonBonSlick
Copy link

It also has odd behaviour when formatting, some feature stop working
#156 (comment)

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