# scheduler-default

> Scheduler bound to in-memory appointment data, fixed to a 650px height with a selected default date.

**Framework:** aspnet-core  **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/aspnet-core/scheduler-default.json
```

**Install Package(s)**

```bash
dotnet add package Syncfusion.AspNetCore.Schedule
```

**Notes**

- Syncfusion release: 2026 Volume 2 (v34.1.29)
- 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.cshtml

```cshtml
@page

@model EJ2CoreSampleBrowser.Models.DefaultFunctionalitiesModel

    <div class="col-lg-9 control-section">
        <div class="schedule-wrapper">
            <ejs-schedule id="schedule" height="650px" selectedDate="new DateTime(DateTime.Today.Year, 1, 10)">
                <e-schedule-eventsettings dataSource="@Model.DataSource"></e-schedule-eventsettings>
            </ejs-schedule>
        </div>
    </div>

    <script type="text/javascript">
        function onChange(args) {
            var scheduleObj = document.getElementById('schedule').ej2_instances[0];
            scheduleObj.selectedDate = args.value;
            scheduleObj.dataBind();
        }
    </script>
```

### src/components/scheduler-default/scheduler.cshtml.cs

```cs
using Microsoft.AspNetCore.Mvc.RazorPages;

namespace EJ2CoreSampleBrowser.Models;

public class DefaultFunctionalitiesModel : PageModel
{
    public List<AppointmentData> DataSource { get; set; }

    public void OnGet()
    {
        DataSource = GetAppointmentData();
    }

    private static DateTime Today = DateTime.Now;
    private int CurrentYear = Today.Year;

    public List<AppointmentData> GetAppointmentData()
    {
        List<AppointmentData> appData = new List<AppointmentData>();
        appData.Add(new AppointmentData
        {
            Id = 1,
            Subject = "Explosion of Betelgeuse Star",
            Location = "Space Centre USA",
            StartTime = new DateTime(CurrentYear, 1, 9, 9, 30, 0),
            EndTime = new DateTime(CurrentYear, 1, 9, 11, 0, 0),
            CategoryColor = "#1aaa55"
        });
        appData.Add(new AppointmentData
        {
            Id = 9,
            Subject = "Alien Civilization",
            Location = "Space Centre USA",
            StartTime = new DateTime(CurrentYear, 1, 17, 11, 0, 0),
            EndTime = new DateTime(CurrentYear, 1, 17, 13, 0, 0),
            CategoryColor = "#7fa900"
        });
        appData.Add(new AppointmentData
        {
            Id = 10,
            Subject = "Wildlife Galleries",
            Location = "Africa",
            StartTime = new DateTime(CurrentYear, 1, 19, 11, 0, 0),
            EndTime = new DateTime(CurrentYear, 1, 19, 13, 0, 0),
            CategoryColor = "#ea7a57"
        });

        return appData;
    }
}

public class AppointmentData
{
    public int Id { get; set; }
    public string Subject { get; set; }
    public string Location { get; set; }
    public DateTime StartTime { get; set; }
    public DateTime EndTime { get; set; }
    public string CategoryColor { get; set; }
}

```
