We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Datetime picker format after saving

Hi,

I am using a Grid with an editable date column and when I edit the field and save the date format changes:


I am struggling with this, really appreciate the support,

Thanks in advance


5 Replies

MS Madhu Sudhanan P Syncfusion Team December 5, 2018 10:23 AM UTC

Hi Laura, 

Thanks for contacting Syncfusion support. 

Could you please check and address the below queries which help us to analyze further on the reported problem. 

1.       Share the grid package version 
2.       Share the type of data binding used. [Local using viewbag or remote binding using controller action] 
3.       Share the grid rendering code to check column and edit type used. 
4.       If you have used remote data binding then please share the network tab while saving record to check request and its response. 
5.       Also any information that you find valuable for us to analyze further. 

Regards, 
Madhu Sudhanan P   



LJ Laura Jordan January 14, 2019 07:40 PM UTC

Hi Madhu,

Thanks for your replay, here is the information you requested:

1.       Share the grid package version: 
Version=14.1400.0.46
2.       Share the type of data binding used. [Local using viewbag or remote binding using controller action] :
Local binding via ViewBag (Datasource(ds => ds.Json((IEnumerable)ViewBag.MasterData).BatchURL("BatchUpdateAnexo").Adaptor(AdaptorType.RemoteSaveAdaptor)))
3.       Share the grid rendering code to check column and edit type used:
col.Field("Vencimiento").HeaderText("Vencimiento").EditType(EditingType.Datepicker).Format("{0:MM/dd/yyyy}").TextAlign(TextAlign.Center).Width(200).CssClass("myHeader").HeaderTextAlign(TextAlign.Left).AllowEditing(true).Add();
4.       If you have used remote data binding then please share the network tab while saving record to check request and its response:
I am not using remote data binding
5.       Also any information that you find valuable for us to analyze further. :
I attach my view an controller code

Thanks for the support!

Attachment: code_12f5e39c.rar


VN Vignesh Natarajan Syncfusion Team January 16, 2019 11:58 AM UTC

Hi Laura, 
 
Thanks for the update. 
 
We have prepared a sample using your code example in version 14.1.0.46 but we are unable to reproduce the reported issue at our end. Kindly download the sample from below link 
 
 
From you code example, we have found that you have not enabled IsPrimaryKey property to any of available column which has unique values. Refer our Knowledge base document on PrimaryKey for your reference 
 
 
If you still  face the issue, kindly try to reproduce the reported issue in provided sample and get back to us.   And also share the details regarding action performed in client side events.  
 
Note: In the server side, you have used DateTime.ParseExact .Kindly share more details regarding that conversion. Because while returning from the DatePicker, value will be in form of DateObject.  
 
Regards,
Vignesh Natarajan
 



LJ Laura Jordan January 16, 2019 06:29 PM UTC

Hi Vignesh,

Thanks for your replay.

I was unable to execute the example that you send me, it shows me some compilation errors:



I still getting the same issue with the edition of the date field.
In the server side I am using DateTime.ParseExact because the date format that I get from the view is like: ddd MMM dd yyyy HH:mm:ss 'GMT-0600 (Central Standard Time).  :(