feat: add EditEventScreen with calendar and chat mode support
Add a unified event editor that works in two modes: - Calendar mode: Create/edit events directly via EventService API - Chat mode: Edit AI-proposed events before confirming them The chat mode allows users to modify proposed events (title, time, recurrence) and persists changes both locally and to the server. New components: DateTimePicker, ScrollableDropdown, useDropdownPosition New API: PUT /api/chat/messages/:messageId/proposal
This commit is contained in:
@@ -34,3 +34,15 @@ export function getDay(
|
||||
result.setHours(hour, minute, 0, 0);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if an event spans multiple days.
|
||||
* Compares dates at midnight to determine if start and end are on different calendar days.
|
||||
*/
|
||||
export function isMultiDayEvent(start: Date, end: Date): boolean {
|
||||
const startDate = new Date(start);
|
||||
const endDate = new Date(end);
|
||||
startDate.setHours(0, 0, 0, 0);
|
||||
endDate.setHours(0, 0, 0, 0);
|
||||
return startDate.getTime() !== endDate.getTime();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user