Format date in Month Timeline View

Good morning,

How could I format the date in the header? I tried in many different ways but without success. I'd like to see the month in each cell and not just in the first one.

Thank you,

Matteo Messmer



3 Replies 1 reply marked as answer

PN Praveenkumar Narasimhanaidu Syncfusion Team October 6, 2021 01:43 PM UTC

Hi Matteo, 

Greetings from Syncfusion support..! 

We have validated your requirement “Format date in Month Timeline View” and you can achieve it with help of scheduler dateHeaderTemplate. We have also prepared a sample for your reference which can be viewed from the following link. 

Index.js 
 getDateHeaderText(props) { 
    return this.instance.formatDate(props.date, { skeleton: 'MMMd' }); 
  } 
  render() { 
    return ( 
      <div className="schedule-control-section"> 
        <div className="col-lg-12 control-section"> 
          <div className="control-wrapper"> 
            <ScheduleComponent 
              cssClass="timeline-resource-grouping" 
              width="100%" 
              height="650px" 
              selectedDate={new Date(2021, 3, 4)} 
              currentView="TimelineMonth" 
              dateHeaderTemplate={this.getDateHeaderText.bind(this)} 
              workDays={this.workDays} 
              eventSettings={{ dataSource: this.data }} 
              group={{ resources: ['Projects', 'Categories'] }}> 
 
 
For more information about date skeletons and dateHeaderTemplate, please refer to below documentation links. 
 
Kindly try the above solution and get back to us if you need any further assistance. 

Regards, 
Praveenkumar 


Marked as answer

MA matteomessmer April 27, 2022 07:10 PM UTC

I'm sorry, I missed the reply or probably forgot to reply.

Thank you as always!

Best regards,

Matteo Messmer



VM Vengatesh Maniraj Syncfusion Team replied to matteomessmer April 28, 2022 03:38 AM UTC

Hi Matteo,


Thanks for the update.

Please let us know if you need any further assistance.


Regards,

Vengatesh


Loader.
Up arrow icon