ProSchedulerSign in

Agenda · Templating

Custom header

A centred title between the arrows, built from the header building blocks.

Live demo

Page forward · Change the span

Fullscreen
import { CalendarNav, CalendarNext, CalendarPrev, CalendarToday, ProScheduler, ViewLengthSelect } from "@andreisaac/pro-scheduler"
import { studioEvents, studioResources } from "./data/studio"
import { useEvents } from "./kit"

export function AgendaHeaderDemo() {
  const { events, handlers } = useEvents(studioEvents)

  return (
    <ProScheduler
      data={events}
      resources={studioResources}
      view={{ agenda: { type: "month" } }}
      renderHeader={() => (
        <div className="flex items-center gap-2 border-b border-border bg-muted/40 px-3 py-2">
          <CalendarPrev />
          <CalendarNav className="flex-1 text-center" />
          <CalendarNext />
          <CalendarToday />
          <ViewLengthSelect />
        </div>
      )}
      height={560}
      {...handlers}
    />
  )
}

About this demo

A centred title between the arrows, built from the header building blocks.

Things to try

  • Page forward
  • Change the span

The props behind it are explained in Custom rendering.

Use ProScheduler in your project