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

Schedular Date-Wise-Grouping

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

5 Replies

VD Vinitha Devi Murugan Syncfusion Team 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 



SN Sinchan NIkam 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



VM Vengatesh Maniraj Syncfusion Team 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 



SN Sinchan NIkam January 2, 2020 01:33 PM UTC

It's working....

Many Thanks.

Regards,
Sinchan


VM Vengatesh Maniraj Syncfusion Team January 3, 2020 05:31 AM UTC

Hi Sinchan, 
  
You are most welcome. 
  
Regards, 
Vengatesh 


Loader.
Live Chat Icon For mobile
Up arrow icon