ProSchedulerSign in

Timeline · Look & feel

Right-to-left

dir="rtl" runs time from right to left: resources on the right, the axis mirrored, drags and resizes following the pointer.

Live demo

Drag a session later — to the left · Resize one from its start edge

Fullscreen
import { localeEn, ProScheduler, type SchedulerLocale } from "@andreisaac/pro-scheduler"
import { studioResources, studioSessions } from "./data/studio"
import { useEvents } from "./kit"

/** English strings with Arabic labels; dates come from Intl in Arabic. */
const localeAr: SchedulerLocale = {
  ...localeEn,
  code: "ar",
  firstDay: 6,
  todayText: "اليوم",
  resourcesText: "الموارد",
  newEventText: "حدث جديد",
  editEventText: "تعديل الحدث",
  titleText: "العنوان",
  resourceText: "المورد",
  startText: "البداية",
  endText: "النهاية",
  cancelText: "إلغاء",
  saveText: "حفظ",
  createText: "إنشاء",
  deleteText: "حذف",
  dayText: "يوم",
  weekText: "أسبوع",
  monthText: "شهر",
  yearText: "سنة",
}

export function TimelineRtlDemo() {
  const { events, handlers } = useEvents(() => studioSessions())
  return (
    <ProScheduler
      dir="rtl"
      locale={localeAr}
      data={events}
      resources={studioResources}
      view={{ timeline: { type: "week", resolutionHorizontal: "hour", startTime: "08:00", endTime: "19:00" } }}
      styleConfig={{ unitWidthPx: 26, fitToWidth: false }}
      height={480}
      {...handlers}
    />
  )
}

About this demo

dir="rtl" runs time from right to left: resources on the right, the axis mirrored, drags and resizes following the pointer.

Things to try

  • Drag a session later — to the left
  • Resize one from its start edge

The props behind it are explained in Output and scale.

Use ProScheduler in your project