This is a migrated thread and some comments may be shown as answers.

Gantt Chart Time Problem

1 Answer 46 Views
Gantt
This is a migrated thread and some comments may be shown as answers.
Nabil
Top achievements
Rank 1
Nabil asked on 04 Jan 2018, 07:41 AM

i'm facing an issue related to TIME in gantt chart. 

the problem is if i'm having time at server side    Start -> 1:00:00 and End -> 3:00:00 then in the browser in date field the time is showing like 1:00:00 is being shown as 6:00 and 3:00:00 is being shown as  8:00 . But when i save this task then at server side same time 1:00 and 3:00 is posted which is being done by onUpdateCreate() event method. i want to show same time which is at the server at the client side. how can i do that ?

 

 

1 Answer, 1 is accepted

Sort by
0
Accepted
Veselin Tsvetanov
Telerik team
answered on 05 Jan 2018, 12:22 PM
Hi Nabil,

The observed shift of the Start / End time is caused by the fact that the JavaScript dates in the browser are always in the client Timezone. If you store and send the dates from / to the server in UTC (the onUpdateCreate() handler function does that), difference as the observed will be present.

If you need to keep the server UTC dates and display them on the client, the implementation should be slightly altered. Here you will find a documentation article explaining how to achieve the desired for a Grid widget. The approach for the Gantt chart would be similar, handling the requestEnd event of its DataSource. 

Regards,
Veselin Tsvetanov
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Gantt
Asked by
Nabil
Top achievements
Rank 1
Answers by
Veselin Tsvetanov
Telerik team
Share this question
or