-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Native Datepicker issue on mobile Chrome for Android #1591
Comments
Did you check the value (v-model) ? |
Try to change timezone on your phone, xD. |
It is currently 18:52 in Montreal, Canada (Eastern Time). When I select the 27 of july and console.log the output of change event, I receive the following string: The problem does not occur when using the buefy datepicker, only with the native one. |
The issue is here : Datepicker.vue
Because of that, when the value is parsed in the input via the Update This would be a quick and easy fix:
Update 2 The detail behind why Y-m-d creates a date in UTC, and Y-m-d h:i:s create a date in user's timezone is described here: https://stackoverflow.com/a/21153059 Generally speaking, when dealing with Date objects in js, I believe it's better to avoid to automatic parsing and instead manually set the date. |
@francoislevesque indeed you can define a parser function, btw i'll add the quick fix |
Overview of the problem
Buefy version: 0.7.10
Vuejs version: 2.6.10
OS/Browser: Chrome mobile Android
Timezone: America/Toronto
Description
The native datepicker doesn't selected the correct date on Chrome Mobile for Android. I haven't tested the other mobile browsers.
Steps to reproduce
Expected behavior
The registered date should be the selected one.
Actual behavior
The registered date is one day off.
Video link
https://youtu.be/lklamdGzGbw
The text was updated successfully, but these errors were encountered: