# scheduler-default

> Scheduler with day, week, work week, month, agenda, resizing, drag-and-drop events, and a current-date picker.

**Framework:** react  **Component:** Scheduler  **Variant:** default

## Get this item

**If you are an agent, fetch the JSON.** Source is inlined, so one request is enough and no tooling is required:

```
GET https://ai.syncfusion.com/r/react/ts/scheduler-default.json
```

**Install Package(s)**

```bash
npm install @syncfusion/ej2-react-schedule @syncfusion/ej2-react-calendars
```

**Notes**

- Syncfusion release: 2026 Volume 3 (v35.1.37)
- The Syncfusion package is licensed. The composition in this file is source you own and edit. See https://ai.syncfusion.com/licensing.md

## Source files

### src/components/scheduler-default/Scheduler.tsx

```tsx
import { useState, useRef } from 'react';
import { ScheduleComponent, ViewsDirective, ViewDirective, Day, Week, WorkWeek, Month, Agenda, Inject, Resize, DragAndDrop, type DragEventArgs } from '@syncfusion/ej2-react-schedule';
import { DatePickerComponent } from '@syncfusion/ej2-react-calendars';
import { extend } from '@syncfusion/ej2-base';
import { eventData } from '../datasource/scheduler-data';

/**
 * Schedule Default sample
 */

const Default = () => {
  const scheduleObj = useRef<ScheduleComponent>(null);
  const data: Record<string, any>[] = extend([], eventData, undefined, true) as Record<string, any>[];
  const [selectedDate, setSelectedDate] = useState<Date>(new Date(2021, 0, 10));

  const onDragStart = (args: DragEventArgs): void => {
    if (args.navigation) {
      args.navigation.enable = true;
    }
  }

  const onDateChange = (args: any): void => {
    if (args.value) {
      setSelectedDate(args.value);
    }
  }

  return (
    <div className='schedule-control-section'>
      <div className='col-lg-9 control-section'>
        <div className='control-wrapper'>
          <ScheduleComponent height='650px' ref={scheduleObj} selectedDate={selectedDate} eventSettings={{ dataSource: data }} dragStart={(onDragStart)}>
            <ViewsDirective>
              <ViewDirective option='Day' />
              <ViewDirective option='Week' />
              <ViewDirective option='WorkWeek' />
              <ViewDirective option='Month' />
              <ViewDirective option='Agenda' />
            </ViewsDirective>
            <Inject services={[Day, Week, WorkWeek, Month, Agenda, Resize, DragAndDrop]} />
          </ScheduleComponent>
        </div>
      </div>
      <div className='col-lg-3 property-section'>
        <table id='property' title='Properties' style={{ width: '100%' }}>
          <tbody>
            <tr style={{ height: '50px' }}>
              <td style={{ width: '100%' }}>
                <div>
                  <DatePickerComponent id='datepicker' value={selectedDate} showClearButton={false} change={onDateChange} placeholder='Current Date' floatLabelType='Always' />
                </div>
              </td>
            </tr>
          </tbody>
        </table>
      </div>
    </div>
  );
}
export default Default;

```
