robmonie / jquery-week-calendar

Now actively maintained in the following fork - https://github.com/themouette/jquery-week-calendar
388 stars 388 forks source link

JSON Calendar Dose not show Correct Schedule on Month Change on Sunday #58

Open sahilbatraa opened 8 years ago

sahilbatraa commented 8 years ago

Hi Team,

There is an issue in JSON Calendar , If last day of month is Sunday and a user creates a record for 11:00 PM to 12:00 AM , the record dose not shows up.

Steps to reproduce :

Change Dates in HTML FIle - weekcalendar_json.html - Line 53 to 55.

  date: new Date('2016-01-31T13:15:00.000+10:00'),
  minDate: new Date('2016-01-31T13:15:00.000+10:00'),
  maxDate: new Date('2016-02-06T13:15:00.000+10:00'),

Now in file : events.json - Place the JSON as

[ {"id":1, "start":"2016-01-31T23:00:00.000+05:30", "end":"2016-01-31T24:00:00.000+05:30", "title":"Lunch with TEst1"}, {"id":2, "start":"2016-02-03T23:00:00.000+05:30", "end":"2016-02-03T24:00:00.000+05:30", "title":"Lunch with Test2"} ]

You cannot see the Event on Sunday 31 JAn.

Now change JSON to :+1:

[ {"id":1, "start":"2016-01-31T23:00:00.000+05:30", "end":"2016-01-31T23:59:00.000+05:30", "title":"Lunch with TEst1"}, {"id":2, "start":"2016-02-03T23:00:00.000+05:30", "end":"2016-02-03T24:00:00.000+05:30", "title":"Lunch with Test2"} ]

You will be able to see Calendar Event.

Can someone help me to fix this ?