Skip to content

Latest commit

 

History

History
42 lines (35 loc) · 673 Bytes

README.md

File metadata and controls

42 lines (35 loc) · 673 Bytes

Scheduler

About

A headless calendar component. Features:

  • origin day
  • day view
  • monthly view
  • yearly view
  • select single
  • deselect single
  • select range
  • deselect range
  • toggle
  • detect floor
  • detect ceil
  • detect pole
  • set schedule within day

and many more...

Usage

const { calendar } = useSchedule({ numberOfMonths: 1 })
...
{calendar.map((month) => {
  ...
  {month.map((week, weekIdx) => {
    const weekDayMap = week[1];
    const weekDayArray = [...weekDayMap];

    {weekDayArray.map((dayTouple, dayIdx) => {
      const day = dayTouple[0];
      let schedule = dayTouple[1];
      ...
    })}
  })}
})}