Adjusting the End Date and Start date in Gantt control

7 posts, 0 answers
  1. Marc
    Marc avatar
    4 posts
    Member since:
    Mar 2017

    Posted 28 Jun Link to this post

    I have created a Task model in MVC project and populated it from SQL database through databinding. Now when I try to adjust the Task start date or end date on the Gantt I get errors. It seems like the date format retrieved from the Gantt control doesn't match the one to be stored in the SQL database. Also I don't have control over the Update method.

    Can anyone help??

  2. Nencho
    Admin
    Nencho avatar
    1671 posts

    Posted 30 Jun Link to this post

    Hello Marc,

    The Start and End time should be both in DateTime format in both the DataBase and the TaskViewModel. Could you please share what is the exact error that is thrown at your end when you attempt to change certain Task's start time?

    In addition, it would be best if you could submit a support ticket, along with a runnable sample attached, so we could revise your entire implementation, replicate the issue and pin down the reason for it.

    Regards,
    Nencho
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. Marc
    Marc avatar
    4 posts
    Member since:
    Mar 2017

    Posted 02 Jul in reply to Nencho Link to this post

    Please find attached the sample project.
    In the GanttController if you set a break point in the UpdateTask actin you will notice that when you try to change the dates of the tasks from the Gantt chart the returned Model state is not valid. If you check you will find that the date comes in the format MM/DD/YYYY instead of DD/MM/YYYY.
    How can I make the Gantt chart returns the date in the proper format?
  4. Marc
    Marc avatar
    4 posts
    Member since:
    Mar 2017

    Posted 02 Jul in reply to Marc Link to this post

    The attachment
  5. Joana
    Admin
    Joana avatar
    135 posts

    Posted 04 Jul Link to this post

    Hello Marc,

    As far as I could see, the tasks are read at the same format as they are in the UpdateTask action. If you'd like to use another format in the Edit popup, I suggest that you set the format directly to the datetimepickers. Dummy sample would be: http://dojo.telerik.com/@jivanova/etiPa

    Regards,
    Joana
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  6. Marc
    Marc avatar
    4 posts
    Member since:
    Mar 2017

    Posted 04 Jul in reply to Joana Link to this post

    Dear Joana

    My problem simply is when I adjust the dates by dragging the ends of the Task bar(slot) or even by dragging the whole slot from one place to another I get corrupted dates.

    Please try to launch the attached sample and modify the dates to get better understanding.

    I need when I adjust the dates in the Gantt chart to be able to save it back in the SQL database.

     

  7. Joana
    Admin
    Joana avatar
    135 posts

    Posted 06 Jul Link to this post

    Hello Marc,

    Unfortunately, I am still not able to reproduce an issue where the ModelState is not valid and the tasks cannot be updated. Also, where the format of the dates is modified. I have recorded a video: https://www.screencast.com/t/9ufG1Y0K with the behavior on my side. Could you please explain in more details where you get corrupted dates, where you modify the format of the Start and End of a gantt task and when the issue occurs. Let me know what I am missing in the case.

    I am looking forward to your reply.

    Regards,
    Joana
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 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