twinssbc / AngularJS-ResponsiveCalendar

A pure AngularJS responsive calendar directive
http://twinssbc.github.io/AngularJS-ResponsiveCalendar/demo/
MIT License
112 stars 77 forks source link

All Day not working. #61

Closed captainmorgan0 closed 7 years ago

captainmorgan0 commented 8 years ago

I have the following example where there are 3 all day events, yet they are spanning multiple days https://plnkr.co/edit/5BOY1ATjFFShsehzpilZ?p=preview

My computer's timezone is set to UTC+10:00 Canberra, Melbourne, Sydney.

Am I doing something wrong, or is there a bug? I am using Chrome for my browser

I did discover if I set my timezone to UTC 0, then the all day events appear correctly.

twinssbc commented 8 years ago

@captainmorgan0 Yes. For all day events, the start time and event time has to be in UTC format. I've mentioned it in README.

captainmorgan0 commented 8 years ago

If you have a look at my example i created, you will see that i am using UTC format.

var startTime = new Date(Date.UTC(2016, 09, 04)); var endTime = new Date(Date.UTC(2016, 09, 05)); events.push({ title: 'Event - 1', startTime: startTime, endTime: endTime, allDay: true });

captainmorgan0 commented 8 years ago

I believe there is an issue with daylight savings times, as last week we started daylight savings time. If I change my timezeone to UTC +10:00 Brisbane (which doesn't have daylight savings), the events appear correctly.

twinssbc commented 7 years ago

@captainmorgan0 I think it's a bug. I have fixed it in version 0.1.15. Could you have a check? Thanks!

captainmorgan0 commented 7 years ago

That works now. thanks