# scheduler-sync-google-calendar

> Scheduler synced to Google Calendar appointments and resources for convenient calendar coordination.

**Framework:** blazor  **Component:** Scheduler  **Variant:** sync-google-calendar

## 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/blazor/scheduler-sync-google-calendar.json
```

**Install Package(s)**

```bash
dotnet add package Syncfusion.Blazor.Schedule
```

**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-sync-google-calendar/Scheduler.razor

```razor
@page "/scheduler/sync-google-calendar"
@namespace blazor.Components.Pages.SyncGoogleCalendar.SyncGoogleCalendar
@using Syncfusion.Blazor.Schedule

<div class="control-section">
    <div class="schedule-container">
        <SfSchedule TValue="GoogleCalendarEvent" Width="100%" Height="650px" Readonly="true" Timezone="UTC"
                    @bind-SelectedDate="SelectedDate" @bind-CurrentView="CurrentView">
            <ScheduleEventSettings TValue="GoogleCalendarEvent" DataSource="@Events"></ScheduleEventSettings>
            <ScheduleViews>
                <ScheduleView Option="View.Day"></ScheduleView>
                <ScheduleView Option="View.Week"></ScheduleView>
                <ScheduleView Option="View.WorkWeek"></ScheduleView>
                <ScheduleView Option="View.Month"></ScheduleView>
                <ScheduleView Option="View.Agenda"></ScheduleView>
            </ScheduleViews>
        </SfSchedule>
    </div>
</div>

@code {
    // A small placeholder list of all-day events shaped like the records a
    // Google Calendar API call would return. Querying the real API needs a
    // network connection and credentials, so this sample stays self-contained.
    public DateTime SelectedDate { get; set; } = DateTime.Today;
    public View CurrentView { get; set; } = View.Month;

    public List<GoogleCalendarEvent> Events { get; set; } = new List<GoogleCalendarEvent>
    {
        new GoogleCalendarEvent { Id = 1, Subject = "All-day sample A", StartTime = DateTime.Today.AddDays(1).Date, EndTime = DateTime.Today.AddDays(2).Date, IsAllDay = true },
        new GoogleCalendarEvent { Id = 2, Subject = "All-day sample B", StartTime = DateTime.Today.AddDays(3).Date, EndTime = DateTime.Today.AddDays(4).Date, IsAllDay = true },
    };

    public class GoogleCalendarEvent
    {
        public int Id { get; set; }
        public string Subject { get; set; } = string.Empty;
        public DateTime StartTime { get; set; }
        public DateTime EndTime { get; set; }
        public bool IsAllDay { get; set; }
    }
}

```
