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

Default date click to timeline day

Thread ID:

Created:

Updated:

Platform:

Replies:

145039 Jun 3,2019 09:23 PM UTC Jun 4,2019 05:41 AM UTC React - EJ 2 1
loading
Tags: Schedule
Brett Simmonds
Asked On June 3, 2019 09:23 PM UTC

Currently, the calendar component I am using has Month, Agenda, Timeline Week, and Timeline Day views injected. The default behavior for the monthly calendar is to go to the day view when clicking on the date, however, we do not include the day view as part of the calendar so nothing happens when you try to select the dare. Is there a way to default that to the timeline day view?

Karthigeyan Krishnamurthi [Syncfusion]
Replied On June 4, 2019 05:41 AM UTC

Hi Brett, 
 
Syncfusion greetings. 
 
Using renderCell and actionComplete events, we prepared the sample to navigate to TimelineDay view when the date is clicked in Month view. 
 
this.change = false; 
 
onRender(args) { 
    if (args.element.classList.contains('e-work-cells') && this.scheduleObj.currentView === "Month") { 
      args.element.children[0].onclick = this.ChangeView.bind(this); 
    } 
  } 
  ChangeView(e) { 
    this.scheduleObj.selectedDate = new Date(parseInt(e.target.parentElement.getAttribute('data-date'))); 
    this.scheduleObj.currentView = "TimelineDay"; 
    this.change = true; 
  } 
  Complete(args) { 
    if (args.requestType == "viewNavigate" && this.change) { 
      this.scheduleObj.currentView = "TimelineDay"; 
      this.change = false; 
    } 
  } 
<ScheduleComponent width='100%' height='550px' ref={schedule => this.scheduleObj = schedule} selectedDate={new Date(2018, 1, 15)} eventSettings={{ dataSource: this.data }} renderCell={this.onRender.bind(this)} actionComplete={this.Complete.bind(this)} currentView='Month'> 
 
 
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