vue-fullcalendar icon indicating copy to clipboard operation
vue-fullcalendar copied to clipboard

all events displaying on wrong previous date

Open rolandszpond opened this issue 8 years ago • 6 comments

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

rolandszpond avatar Sep 17 '17 01:09 rolandszpond

Experiencing the same issue with latest version.

The event dates are correct when inspecting in Vue dev tools.

coryrose1 avatar Sep 23 '17 16:09 coryrose1

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?

maxorlovsky avatar Oct 06 '17 05:10 maxorlovsky

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?

francoislevesque avatar Nov 12 '17 19:11 francoislevesque

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

paulrosen avatar Nov 17 '17 20:11 paulrosen

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.

paulrosen avatar Nov 17 '17 20:11 paulrosen

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...

francoislevesque avatar Nov 24 '17 01:11 francoislevesque