vue-datepicker-next
vue-datepicker-next copied to clipboard
[Bug] 1st of month defaultValue often shows up as previous month depending on timezone.
Vue2-datepicker version: "[email protected]" Vue version: 3.2.45 Browser: Chrome
Steps to reproduce
<date-picker name="dueDate" format="YYYY-MM-DD" value-type="YYYY-MM-DD" defaultValue="2023-07-01" :value="dueDate" @change="handleDateChanged" />
When you open the date picker in North America it defaults to the June Calendar month not July. This however works as expected in Australia. I'd guess its a timezone thing, but not sure how to solve on our end. I checked through all the closed issues and couldn't see something like this already.
Edit to add: You can test this in Chrome Dev Tools by clicking the 3 dots, more tools, sensors, and set the location override to San Fransisco.
Reproduction Link or Source Code https://codesandbox.io/s/patient-meadow-gkuppz?file=/src/App.vue:61-98
Expected behavior Opens to July in all locations/timezones
Actual behavior Opens to June in North America (PST)