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:
*****
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.