CroudTech / vue-fullcalendar

FullCalendar Wrapper for vue
MIT License
483 stars 100 forks source link

end date is the day before the selected date #199

Closed sunhuihuibuhui closed 5 years ago

sunhuihuibuhui commented 5 years ago

The version I'm using is "vue-full-calendar: ^2.7.0","vue-fullcalendar: ^1.0.9", When I chose April 16th to 20th, the actual date was from 16th to 19th I hope the selected end date is the same as the actual end date displayed thank you~

jstr14 commented 5 years ago

I have a similar error. When I display events on calendar end date displayed is one day less than end date.

Any solution?

sunhuihuibuhui commented 5 years ago

I have a similar error. When I display events on calendar end date displayed is one day less than end date.

Any solution?

no

BrockReece commented 5 years ago

Is it setting the end date's time to 00:00:00 so it appears like it stops a day early?

jstr14 commented 5 years ago

I'm not setting the end date's time. I create my event like this:

{
title: 'name',
start: '2019-05-09',
end: '2019-05-10'
}
BrockReece commented 5 years ago

What if you add the allDay: true property?

jstr14 commented 5 years ago

What if you add the allDay: true property?

With allDay property it has same behaviour.

Edit: I try to add date like: YYYY-MM-DDTHH:mm:ss and use allDay:false, using this method event is displayed correctly but name displayed on event is like: 00:00 Event name

Is possible to avoid show hour on event displayed name?

BrockReece commented 5 years ago

Have you checked the docs of fullcalendar?

jstr14 commented 5 years ago

Have you checked the docs of fullcalendar?

Yes I check it. After read event-object docs I solve it adding one day to events that end date is not same day of start date.

https://fullcalendar.io/docs/event-object

Date object that obeys the current timeZone. When your event ends. Could be null if you never specified an end. This value is exclusive! I repeat, this value is exclusive!!! An event with the end of 2018-09-03 will appear to span through the 2nd of the month, but will end before the start of the 3rd of the month.

After read this I think my solution is the best way to display events that duration is more than one day

BrockReece commented 5 years ago

Ah cool, thanks for doing the leg work on that.