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??
6 Answers, 1 is accepted
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

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?

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

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.
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