Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
toolbar: Toolbar,
eventWrapper: EventWrapper,
}}
dayPropGetter={customDayPropGetter}
slotPropGetter={customSlotPropGetter}
defaultDate={new Date()}
resources={getResources()}
resourceAccessor={event => event.resourceId}
resourceIdAccessor={resource => resource.id}
resourceTitleAccessor={resource => resource.title}
/>
);
}
}
const localizer = globalizeLocalizer(globalize);
ReactDOM.render(, document.body);
}
// Test fixtures
function getEvents(): CalendarEvent[] {
const events: CalendarEvent[] = [
new CalendarEvent('All Day Event', new Date(2015, 3, 0), new Date(2015, 3, 0), true),
new CalendarEvent('Long Event', new Date(2015, 3, 7), new Date(2015, 3, 10)),
new CalendarEvent('DTS STARTS', new Date(2016, 2, 13, 0, 0, 0), new Date(2016, 2, 20, 0, 0, 0)),
new CalendarEvent('DTS ENDS', new Date(2016, 10, 6, 0, 0, 0), new Date(2016, 10, 13, 0, 0, 0)),
new CalendarEvent('Some Event', new Date(2015, 3, 9, 0, 0, 0), new Date(2015, 3, 9, 0, 0, 0)),
new CalendarEvent('Conference', new Date(2015, 3, 11), new Date(2015, 3, 13), undefined, 'Big conference for important people'),
new CalendarEvent('Meeting', new Date(2015, 3, 12, 10, 30, 0, 0), new Date(2015, 3, 12, 12, 30, 0, 0), undefined, 'Pre-meeting meeting, to prepare for the meeting'),
new CalendarEvent('Lunch', new Date(2015, 3, 12, 12, 0, 0, 0), new Date(2015, 3, 12, 13, 0, 0, 0), undefined, 'Power lunch'),
new CalendarEvent('Meeting', new Date(2015, 3, 12, 14, 0, 0, 0), new Date(2015, 3, 12, 15, 0, 0, 0)),
new CalendarEvent('Happy Hour', new Date(2015, 3, 12, 17, 0, 0, 0), new Date(2015, 3, 12, 17, 30, 0, 0), undefined, 'Most important meal of the day'),