Custom Time Slot Template with dialog

I have a problem when using custom timeslot templates.
When I show a dialog over the schedule, the timeslots dissapear.

Any ideas?
Basic example here...

https://stackblitz.com/edit/react-q72tnz

I've tried to use the .show method on the dialog which works but some text I want to display in the dialog does not get passed through in props.

Thanks

3 Replies

HB Hareesh Balasubramanian Syncfusion Team February 21, 2020 09:41 AM UTC

Hi Richard, 

Greetings from Syncfusion Support. 

Based on your shared sample, we have validated your reported issue and hence this issue can be overcome by enabling the delayUpdate property(Base) for the Scheduler. The root cause for this issue is that the react DOM render is calling twice when we call the setstate and hence Schedule React and template renders simultaneously. So we need have provided this property to overcome this type of issues. And for the same we have modified your shared sample, it can be viewed from the following link, 


Code snippet:  
<ScheduleComponent delayUpdate='true' height='650px' ref={schedule => this.scheduleObj = schedule} 
timeScale={{ 
  enable: true, interval: 60, slotCount: 6, 
  majorSlotTemplate: this.majorSlotTemplate.bind(this), 
  minorSlotTemplate: this.minorSlotTemplate.bind(this) 
}} 
selectedDate={new Date(2019, 0, 10)} eventSettings={{ dataSource: this.data }} 
dragStart={(this.onDragStart.bind(this))}> 
<ViewsDirective> 
  <ViewDirective option='Day' /> 
  <ViewDirective option='Week' /> 
  <ViewDirective option='WorkWeek' /> 
  <ViewDirective option='Month' /> 
  <ViewDirective option='Agenda' /> 
</ViewsDirective> 
<Inject services={[Day, Week, WorkWeek, Month, Agenda, Resize, DragAndDrop]} /> 
</ScheduleComponent> 

Kindly try the above sample, if you have any other concerns please revert for further assistance. 

Regards,  
Hareesh 



RC Richard Craig February 21, 2020 09:50 AM UTC

Many thanks, that worked :)

I couldn't find anything in the API, but have now found it in the "How To" section.


VM Vengatesh Maniraj Syncfusion Team February 24, 2020 04:47 AM UTC

Hi Richard, 

You are most welcome. 

We are happy that our solution has resolved your problem. 

Regards, 
Vengatesh. 


Loader.
Up arrow icon