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

Schedular Date-Wise-Grouping

Thread ID:

Created:

Updated:

Platform:

Replies:

150249 Dec 28,2019 01:01 PM UTC Jan 3,2020 05:31 AM UTC React - EJ 2 5
loading
Tags: Schedule
Sinchan NIkam
Asked On December 28, 2019 01:01 PM UTC

Dear Team,

We are using the Schedular's Date-Wise-Grouping Resource..

and we are tried to set different workHours for each resource.

but, we are unable to do so and it doesn't reflect any error or warning.

And the same issue with scrollTo funciton.

Could you please help us on this. 

Regards,
Suresh

Vinitha Devi Murugan [Syncfusion]
Replied On December 30, 2019 11:38 AM UTC

Hi Sinchan, 

Syncfusion Greetings. 

We achieved your requirement by using resource startHourField and endHourfield to set the resource's various work start and end hours. Also we scrolled the scheduler to a specific time based on the system’s current time using dataBound event. 


 <ResourcesDirective> 
                <ResourceDirective 
                  field="TaskId" 
                  title="Assignee" 
                  name="Owners" 
                  allowMultiple={true} 
                  dataSource={this.resourceData} 
                  textField="text" 
                  idField="id" 
                  colorField="color" 
                  startHourField="startHour" 
                  endHourField="endHour" 
                /> 

 
Kindly try the samples and Please let us know if you need any further assistance on this.   
 
Regards, 
M.Vinitha devi 


Sinchan NIkam
Replied On December 31, 2019 05:13 AM UTC

Hi Vinitha,

Thanks for the solution..

One more thing, can we apply different work hours for each day of a resource.

Regards,
Sinchan


Vengatesh Maniraj [Syncfusion]
Replied On January 2, 2020 10:54 AM UTC

Hi Sinchan, 

Thanks for the update. 

We can apply different work hours for different days in a resource by making use of setWorkHours method like below 

 if (this.islayoutChanged) { 
      var renderdate = this.scheduleObj.activeView.getRenderDates(); 
      this.scheduleObj.resetWorkHours(); 
      for (var i = 0; i < renderdate.length; i++) { 
        var dayindex = renderdate[i].getDay(); 
        if(dayindex !== 0 && dayindex !== 6){ 
          //first resource 
          this.scheduleObj.setWorkHours([renderdate[i]],this.workHours1[dayindex].startHour,this.workHours1[dayindex].endHour,0); 
          //second resource 
          this.scheduleObj.setWorkHours([renderdate[i]],this.workHours2[dayindex].startHour,this.workHours2[dayindex].endHour,1); 
        } 
      } 
    } 




Kindly try the above and revert us for further assistance. 

Regards, 
Vengatesh 


Sinchan NIkam
Replied On January 2, 2020 01:33 PM UTC

It's working....

Many Thanks.

Regards,
Sinchan

Vengatesh Maniraj [Syncfusion]
Replied On January 3, 2020 05:31 AM UTC

Hi Sinchan, 
  
You are most welcome. 
  
Regards, 
Vengatesh 


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