How to display the Time text on slots.

I'm working with Angular Schedule. I've the following settings applied for timeScale:
  public timeScaleTimeScaleModel = {
    enable: true,
    interval: 60,
    slotCount: 4,
  };
and I get the following view:

Intervals of 15 minutes each.
My Question is, how can I get the time against each block? Something like the following:


Hope I've made the question understandable.


3 Replies 1 reply marked as answer

NR Nevitha Ravi Syncfusion Team February 19, 2021 12:19 PM UTC

Hi Moiz, 

Greetings from Syncfusion Support. 

We can achieve your requirement using majorSlotTemplate and minorSlotTemplate, please refer to the following sample and UG. 
 
  public instance: Internationalization = new Internationalization(); 
  getMajorTime(date: Date): string { 
    return this.instance.formatDate(date, { skeleton: "hm" }); 
  } 
  getMinorTime(date: Date): string { 
    return this.instance.formatDate(date, { skeleton: "hm" }); 
  } 
 
      <ng-template #timeScaleMajorSlotTemplate let-data> 
        <div class="majorTime">{{getMajorTime(data.date)}}</div> 
      </ng-template> 
      <ng-template #timeScaleMinorSlotTemplate let-data> 
        <div class="minorTime">{{getMinorTime(data.date)}}</div> 
      </ng-template> 
 

Please get back to us if you need any further assistance. 

Regards, 
Nevitha 


Marked as answer

MO Moiz February 23, 2021 06:34 PM UTC

Thanks a lot! Solves my query. Thank you for your swift response. Have a great day. Cheers.


VM Vengatesh Maniraj Syncfusion Team February 24, 2021 08:23 AM UTC

Hi Moiz, 
 
You are most welcome😊. 
 
We are happy that our solution has resolved your query. 
 
Please get in touch with us if you need any further assistance. 
 
Have a great day!!! 
 
Regards, 
Vengatesh  


Loader.
Up arrow icon