CEES-manage/src/views/demo/fullcalendar/event-utils.ts

22 lines
448 B
TypeScript

import { EventInput } from '@fullcalendar/vue3';
let eventGuid = 0;
let todayStr = new Date().toISOString().replace(/T.*$/, ''); // YYYY-MM-DD of today
export const INITIAL_EVENTS: EventInput[] = [
{
id: createEventId(),
title: 'All-day event',
start: todayStr,
},
{
id: createEventId(),
title: 'Timed event',
start: todayStr + 'T12:00:00',
},
];
export function createEventId() {
return String(eventGuid++);
}