The events that occur in React Scheduler.
A live React example of jqxScheduler, the jQWidgets Scheduler component, with its complete source code below. It is one of 44 jqxScheduler demos for React.
appointmentDataFields property – Sets or gets the appointments data fields.date property – Sets or gets the Scheduler's Date.height property – Sets or gets the Scheduler's height.ready property – Sets a function called when the Scheduler is rendered and ready for usage.rowsHeight property – Sets or gets the Scheduler rows height.showLegend property – Sets or gets whether the Scheduler's legend bar is displayed.source property – Sets or gets the Scheduler appointments data source.theme property – Sets the widget's theme.views property – Sets or gets the Scheduler's views.view property – Sets or gets the Scheduler's view.width property – Sets or gets the Scheduler's width.appointmentChange event – This event is triggered when an appointment is changed.appointmentDoubleClick event – This event is triggered when an appointment is double clicked.appointmentDelete event – This event is triggered when an appointment is deleted.appointmentAdd event – This event is triggered when an appointment is added.cellClick event – This event is triggered when a cell is clicked.To run it in your own app, install the package with npm install jqwidgets-scripts, add these files to a Vite React and TypeScript project, and import jqx.base.css and a theme in main.tsx. Getting started with jqxScheduler shows the setup step by step.
import { useRef, useMemo, useCallback } from 'react'
import JqxScheduler, { jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxscheduler'
interface DataField {
name: string
type: string
format?: string
}
interface AppointmentDataFields {
description: string
from: string
id: string
location: string
resourceId: string
status: string
style: string
subject: string
to: string
}
function App() {
const myScheduler = useRef<JqxScheduler>(null)
const myLog = useRef<HTMLDivElement>(null)
const source = useMemo(
() => ({
dataFields: [
{ name: "id", type: "string" },
{ name: "status", type: "string" },
{ name: "about", type: "string" },
{ name: "address", type: "string" },
{ name: "company", type: "string" },
{ name: "name", type: "string" },
{ name: "style", type: "string" },
{ name: "calendar", type: "string" },
{ name: "start", type: "date", format: "yyyy-MM-dd HH:mm" },
{ name: "end", type: "date", format: "yyyy-MM-dd HH:mm" }
] as DataField[],
dataType: "json",
id: "id",
url: 'appointments.txt'
}),
[]
)
const dataAdapter = useMemo(() => new jqx.dataAdapter(source), [source])
const appointmentDataFields: AppointmentDataFields = useMemo(
() => ({
description: "about",
from: "start",
id: "id",
location: "address",
resourceId: "calendar",
status: "status",
style: "style",
subject: "name",
to: "end"
}),
[]
)
const views = useMemo(() => ["dayView", "weekView"], [])
const ready = useCallback(() => {
myScheduler.current?.scrollTop?.(700)
}, [])
const handleLog = useCallback((message: string) => {
if (myLog.current) {
myLog.current.textContent = message
}
}, [])
const mySchedulerOnAppointmentDelete = useCallback((): void => {
handleLog('appointmentDelete is raised')
}, [handleLog])
const mySchedulerOnAppointmentAdd = useCallback((): void => {
handleLog('appointmentAdd is raised')
}, [handleLog])
const mySchedulerOnAppointmentDoubleClick = useCallback((): void => {
handleLog('appointmentDoubleClick is raised')
}, [handleLog])
const mySchedulerOnAppointmentChange = useCallback((): void => {
handleLog('appointmentChange is raised')
}, [handleLog])
const mySchedulerOnCellClick = useCallback((): void => {
handleLog('cellClick is raised')
}, [handleLog])
const schedulerDate = useMemo(() => new jqx.date(2026, 11, 18), [])
return (
<div>
<JqxScheduler
theme="tailwind-blue-dark"
ref={myScheduler}
onAppointmentDelete={mySchedulerOnAppointmentDelete}
onAppointmentAdd={mySchedulerOnAppointmentAdd}
onAppointmentDoubleClick={mySchedulerOnAppointmentDoubleClick}
onAppointmentChange={mySchedulerOnAppointmentChange}
onCellClick={mySchedulerOnCellClick}
width="100%"
height={600}
date={schedulerDate}
source={dataAdapter}
showLegend={true}
rowsHeight={40}
view="weekView"
views={views}
appointmentDataFields={appointmentDataFields}
ready={ready}
/>
<br />
<div>Event Log:</div>
<div ref={myLog}></div>
</div>
)
}
export default App