Gantt Chart Time Problem

2 posts, 1 answers
  1. Nabil
    Nabil avatar
    29 posts
    Member since:
    Dec 2017

    Posted 04 Jan Link to this post

    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 ?

     

     

  2. Answer
    Veselin Tsvetanov
    Admin
    Veselin Tsvetanov avatar
    859 posts

    Posted 05 Jan Link to this post

    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.
Back to Top