Interactive Playground

v3.0.13

Explore all calendar features and see callbacks in action

Loading calendar...
Callback log
  • infoCalendar mounted — interact to see callbacks here.
Initialization Code
const calendar = new SimpleCalendarJs('#calendar', {
  defaultView: 'month',
  locale: 'en-US',
  fetchEvents: async (start, end) => {
    const res = await fetch('/api/events');
    return await res.json();
  },
  onEventClick: (event) => {
    console.log('Event clicked:', event);
  },
  onSlotClick: (date) => {
    console.log('Slot clicked:', date);
  },
});