Events after 11pm appear to span two days

John Doe ·

342 Views

Q

The :) event at 11pm is correctly appearing on the correct date (8/1), but the :( event that starts 1 minute later appears to span across two days (8/1 - 8/2). See screenshot below.

 

A

If you don't specify the end time, the default duration is 1 hour which makes it run into the next day:

FullCalendar Demos Docs Support Getting Help Reporting Bugs Requesting Features Contributing Pricing Jul 12 — v6.1.15 Event Model Event Parsing Event Object Recurring Events RRule Plugin Event Data Parsing eventDataTransform defaultAllDay defaultAllDayEve

 

*****

If the start time and the end time are the same, then the issue will also arise.

Solutions:

let calendar = new FullCalendar.Calendar(calendarEl, {
  initialView: 'dayGridMonth',
  //timeZone: 'Asia/Seoul',
  eventTimeFormat: {
	hour: '2-digit',
	minute: '2-digit',
	hourCycle: 'h24'
  },
  defaultTimedEventDuration: '00:00',
  events: [
	{
	  id: 'a',
	  title: 'my event',
	  "start": "2024-07-09T23:02:21",
	  "end": "2024-07-09T23:02:21",
	  //"start": "2024-07-09T23:02:20+0900",
	  //"end": "2024-07-09T23:02:21+0900",
	}
  ]
});

 

OR

 

let calendar = new FullCalendar.Calendar(calendarEl, {
  initialView: 'dayGridMonth',
  //timeZone: 'Asia/Seoul',
  eventTimeFormat: {
	hour: '2-digit',
	minute: '2-digit',
	hourCycle: 'h24'
  },
  //defaultTimedEventDuration: '00:00',
  events: [
	{
	  id: 'a',
	  title: 'my event',
	  //"start": "2024-07-09T23:02:21",
	  //"end": "2024-07-09T23:02:21",
	  "start": "2024-07-09T23:02:20+0900",
	  "end": "2024-07-09T23:02:21+0900",
	}
  ]
});

 

Ref.

See: https://jsfiddle.net/412qh7zx/5/ The :) event at 11pm is correctly appearing on the correct date (8/1), but the :( event that starts 1 minute later appears to span across two days (8/1 - 8/2)....

 

fullcalendar