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

Create record with default date to now

3 Answers 107 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jimmy
Top achievements
Rank 1
Iron
Veteran
Jimmy asked on 19 Feb 2019, 08:06 AM

Hi

I have a simple grid that allow add records and one of my read only field is DateTime.Today with localized format of "dd/MM/yyyy".

When i post the record to server i got invalid date error i.e. "The value '2/19/2019 4:00:16 PM' is not valid for Date.

I tried changing the DateTime..Now.ToString("MM/dd/yyyy") but same error still show.

Can anyone help? thanks.

3 Answers, 1 is accepted

Sort by
0
Jimmy
Top achievements
Rank 1
Iron
Veteran
answered on 19 Feb 2019, 08:46 AM
I saw some comment suggest using parameterMap but all the samples are for Kendo UI for JQuery. How do I use parameterMap on Kendo UI Grid for .net core?
0
Tsvetina
Telerik team
answered on 22 Feb 2019, 05:53 AM
Hello Jimmy,

Can you confirm if the UI culture on the server and client in your project is the same? If your server is using a culture different than Invariant (en-US), you should register the same culture on the client.

You can also see this section that explains how to match the cultures on the server and client to ensure proper handling of culture-specific formats:
Match Cultures

Regards,
Tsvetina
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Jimmy
Top achievements
Rank 1
Iron
Veteran
answered on 22 Feb 2019, 06:59 AM
Thanks Tsvetina , I figured that out and applied the correct culture. Its now working.
Tags
Grid
Asked by
Jimmy
Top achievements
Rank 1
Iron
Veteran
Answers by
Jimmy
Top achievements
Rank 1
Iron
Veteran
Tsvetina
Telerik team
Share this question
or