Open rolandszpond opened 7 years ago
Experiencing the same issue with latest version.
The event dates are correct when inspecting in Vue dev tools.
I'm using 1.0.9 and don't have this issue. Try to play around with props and check if time on your PC playing any role. Just started to use this lib, didn't checked source code yet. Maybe it's not using zulu time?
I have the same problem: all events are one day to soon. I have a feeling this is a time zone issue. Do all people having this issue live in America?
I'm in America and seeing a similar issue but it's more complex. I don't think it is time zone related. I just did a quick test of putting up an item on each day for three months, like this:
for (let i = 1 ; i <= 30; i++) {
events.push({
title: "2017-11-"+i,
start: "2017-11-"+i,
})
}
for (let i = 1 ; i <= 31; i++) {
events.push({
title: "2017-12-"+i,
start: "2017-12-"+i,
})
}
for (let i = 1 ; i <= 31; i++) {
events.push({
title: "2018-1-"+i,
start: "2018-1-"+i,
})
}
The events showed up on the right dates are: November 1 - November 9 December 1 - December 9 January 1 - January 31
The events that showed up a day early: November 10 - November 30 December 10 - December 31
Aha! I get consistency if I zero pad. That is, specify all months and days as two digits:
2017-10-09 instead of 2017-10-9
Then a work around is to just add one to the day before pushing the event.
The bug still exists, but I did several tests:
With a 1 digit month like september:
'2017-9-23' displays correctly '2017-09-23' displays one day before (22th) '2017-09-023' displays correctly '2017-9-023' displays correctly
With a 2 digit month like november:
'2017-11-23' displays one day before (22th) '2017-011-23' displays correctly '2017-011-023' displays correctly '2017-11-023' displays correctly
Overall, always adding "0" seems to do the trick, but Wanderxx should look into it...
all the events are displaying on the previous day than they should..
example: an event on 2017-09-23 is display on 2017-09-22