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

Adjusting the End Date and Start date in Gantt control

6 Answers 469 Views
Gantt
This is a migrated thread and some comments may be shown as answers.
Marc
Top achievements
Rank 1
Marc asked on 28 Jun 2017, 09:57 AM

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

Sort by
0
Nencho
Telerik team
answered on 30 Jun 2017, 11:06 AM
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.
0
Marc
Top achievements
Rank 1
answered on 03 Jul 2017, 04:41 AM
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?
0
Marc
Top achievements
Rank 1
answered on 03 Jul 2017, 04:48 AM
0
Joana
Telerik team
answered on 04 Jul 2017, 12:27 PM

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.
0
Marc
Top achievements
Rank 1
answered on 04 Jul 2017, 01:28 PM

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.

 

0
Joana
Telerik team
answered on 06 Jul 2017, 11:53 AM

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.
Tags
Gantt
Asked by
Marc
Top achievements
Rank 1
Answers by
Nencho
Telerik team
Marc
Top achievements
Rank 1
Joana
Telerik team
Share this question
or