We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Personnalize and change view from *.ts


I'd like to know how i could change between timelineview (TimelineWeek, timelineDay...) in a ts function, for example : 


And also customize the view, for example for the timelineworkweek to set the work day (monday to friday by default or tuesday to sunday).

Thanks by advance!

1 Reply

KK Karthigeyan Krishnamurthi Syncfusion Team July 16, 2019 08:25 AM UTC

Hi Chevron, 
Syncfusion greetings. 
Scheduler currentView property is two way binding and in the below sample, view is changed based on drop down selection. 
 <ejs-schedule #scheduleObj width='100%' height='650px' [selectedDate]="selectedDate" [eventSettings]="eventSettings" [(currentView)]="scheduleView" 
        <e-view option="TimelineDay"></e-view> 
        <e-view option="TimelineWeek"></e-view> 
<ejs-dropdownlist id="scheduleview" [dataSource]='datas' [(value)]='scheduleView'></ejs-dropdownlist> 
In below sample view is changed based on button click action. 
btnClick(): void { 
We can customize the views using e-view and kindly refer the below links. 
                <e-view option="TimelineDay"></e-view> 
                <e-view option="TimelineWeek"></e-view> 
                <e-view option="TimelineWorkWeek" [workDays]="workweekDays"></e-view> 
                <e-view option="TimelineMonth"></e-view> 
                <e-view option="Agenda"></e-view> 
Note: firstDayOfWeek property is used to start the TimelineWorkWeek with Tuesday which will affect all views. We have logged the below improvement report to provide firstDayOfWeek property support on view basis like above workDays property. The fix will be included in our JS2 weekly release on July 30, 2019. 

Live Chat Icon For mobile
Up arrow icon