How can i set the default View In scheduler?

In the Scheduler, I am using the TimelineWeek view with intervals of 1, 2, and 4.

Now, I want to set my default view to TimelineWeek with an intervalCount of 4, without changing the position of the ViewDirective. How can I do that?

The following code is for reference:

<ViewsDirective>

<ViewDirective option="TimelineDay" displayName="Day" />

<ViewDirective option="TimelineWeek" displayName="Week" />

<ViewDirective option="TimelineWeek" interval={2} displayName="2 Weeks" />

<ViewDirective option="TimelineWeek" interval={4} displayName="4 Weeks" />

</ViewsDirective>

<ScheduleComponent

ref={scheduleRef}

key="full-scheduler"

cssClass="timeline-resource-grouping"

currentView="TimelineWeek"

>


1 Reply

SR Swathi Ravi Syncfusion Team February 5, 2025 06:33 AM UTC

Hi Ravi Kumar,

Thank you for reaching out.

You can set the TimelineWeek with 4 intervals as the default view by using the Schedule's view-specific isSelected property.

<ViewsDirective>
            <ViewDirective option="TimelineDay" displayName="Day" />
            <ViewDirective option="TimelineWeek" displayName="Week" />
            <ViewDirective option="TimelineWeek" interval={2} displayName="2 Weeks" />
            <ViewDirective option="TimelineWeek" interval={4} displayName="4 Weeks" isSelected="true"/>
  </ViewsDirective>




Regards,
Swathi

Loader.
Up arrow icon