nathanstitt/dayz

If the first day of the month falls on Monday, Event is not shown on the calendar

Closed this issue · 3 comments

Hi, I am using dayz along to display some integer values for each day when display='month'. For Ex For the month of July 2018, 1st of July falls on sunday and the calendar looks something like this:
capture1

As seen the event should either display some value or '--' for 1st July, However it doesnt display. Looking into the component, it seems the event class is missing
capture

Hence, I printed the new Days.EventCollectionData and it seems the event is present as shown:
capture2

I am unable to fix this issue

I found it as it was a bug in moment library for overlap functionality. As of now, sending time from 1:00 to 23:00 to make overlap function work

Hi @kunal-mehta sorry for the late response on this. I wonder if it might be timezone related since setting the time seems to help. Can you tell me what timezone you're testing in?

Hi @nathanstitt I am using it in India Time Zone (UTC + 5:30). Looks like it was more of an issue with moment.js overlap() function. In my case ,
range1 = moment.range(1 July 2018 00:00:00, 4 Aug 2018 23:59:59),
range2 = moment.range(1 July 2018 00:00:00, 1 July 2018 00:00:00),
range3 = moment.range(4 Aug 2018 23:59:59, 4 Aug 2018 23:59:59)
range1.overlaps(range2) returned false,
while range3.overlaps(range2) retruned true.

I dont really deal with time and just the date, so i made all the ranges to have time from 01:00:00 to 23:00:00 and it works