ProSchedulerSign in

Agenda · Setting up

Show empty days

By default days without events are skipped; showEmptyDays lists every day of the span.

Live demo

Turn empty days off

Fullscreen
import { useState } from "react"
import { ProScheduler } from "@andreisaac/pro-scheduler"
import { studioResources, studioSessions } from "./data/studio"
import { Choice, Toolbar, useEvents } from "./kit"

export function EmptyDaysDemo() {
  const { events, handlers } = useEvents(studioSessions)
  const [showEmptyDays, setShowEmptyDays] = useState(true)

  return (
    <div className="docs-demo__stack">
      <Toolbar>
        <Choice active={showEmptyDays} onClick={() => setShowEmptyDays(!showEmptyDays)}>
          Show empty days
        </Choice>
      </Toolbar>
      <ProScheduler
        data={events}
        resources={studioResources}
        view={{ agenda: { type: "week", size: 2, showEmptyDays } }}
        height={560}
        {...handlers}
      />
    </div>
  )
}

About this demo

By default days without events are skipped; showEmptyDays lists every day of the span.

Things to try

  • Turn empty days off

The props behind it are explained in Views.

Use ProScheduler in your project