Time in Task Start and End

Hi,


Is there a way to set also time (non only date) in Start and End property of a task?

In edit dialog there is only a datepicker, and time is ignored in Json datasource also.


Thank you


4 Replies

SJ Sridharan Jayabalan Syncfusion Team June 6, 2024 01:32 PM UTC

Hi Dani,

 

Greetings from Syncfusion.

 

For your query, we suggest you use editType in the columns field as 'datetimepickeredit' to achieve your requirement in the dialog box. (refer screenshot)

 

To give timing in the datasource, use the format given in the code snippet.

 

Code-Snippet:   

// for dialog box

<e-gantt-column field="startDate" editType= 'datetimepickeredit' ></e-gantt-column>

 

 

// for datasource 

StartDate: new Date('04/02/2019 10:00:00'),

 

 

 


Regards,

Sridharan



DF Daniele Ferri June 6, 2024 02:53 PM UTC

Hi,

It works, thanks.

I changed also the format so I can see time in column (not only in edit):

<e-gantt-column field="StartDate" format="dd/MM/yyyy HH:mm" editType='datetimepickeredit'></e-gantt-column>

<e-gantt-column field="EndDate" format="dd/MM/yyyy HH:mm" editType='datetimepickeredit'></e-gantt-column>


About dialog fields, now it looks like a datetime picker, but I can see only date :

Image_9148_1717685407897


Is it possible to change format also on add / edit dialog fields?

thank you 



SJ Sridharan Jayabalan Syncfusion Team June 7, 2024 10:51 AM UTC

Daniele Ferri,

 

To achieve your requirement, we suggest you use dateFormat property to display the hour & minute in edit/add dialog box. Also, you can change any format using this property. Refer code snippet for more information.

 

Code-Snippet:   

<ejs-gantt id='Gantt' dateFormat = 'MMM d, yy HH:mm',

</ejs-gantt>

 

 

 


 

Regards,

Sridharan



PS pandrik sukkin June 13, 2024 05:36 AM UTC

Thanks for answering, I will try it.


Loader.
Up arrow icon