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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Personnalize and change view from *.ts

Thread ID:

Created:

Updated:

Platform:

Replies:

145947 Jul 15,2019 02:19 PM UTC Jul 16,2019 08:25 AM UTC Angular - EJ 2 1
loading
Tags: Schedule
chevron
Asked On July 15, 2019 02:19 PM UTC

Hello,

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

this.scheduleObj.activeview.setvalue(timelineDay)
...

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!





Karthigeyan Krishnamurthi [Syncfusion]
Replied On 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" 
     (eventRendered)="oneventRendered($event)"> 
      <e-views> 
        <e-view option="TimelineDay"></e-view> 
        <e-view option="TimelineWeek"></e-view> 
      </e-views> 
    </ejs-schedule> 
 
<ejs-dropdownlist id="scheduleview" [dataSource]='datas' [(value)]='scheduleView'></ejs-dropdownlist> 
 
In below sample view is changed based on button click action. 
 
btnClick(): void { 
       this.scheduleObj.currentView='TimelineDay'; 
    } 
 
We can customize the views using e-view and kindly refer the below links. 
 
<e-views> 
                <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> 
            </e-views> 
 
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. 
 
Regards, 
Karthi 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon