Why does a date field always return a default value rather than the input date?

1 Answer 129 Views
Grid
Andrew
Top achievements
Rank 1
Andrew asked on 04 Aug 2023, 02:09 PM

Hello friends,

For the  Kendo Grid, when we add a new record, a date field is always the default value 01/01/0001 in the post back record. It should return the input date value rather than 01/01/0001 (or null if this date field is not required)

However, when we update this 01/01/0001 field in this new created record, the correct date value is returned in the post back record and can be updated successfully.

We are using VS 2022. (When checking mdGiving, we found that date field value is always 01/01/0001 no matter what we entered for that field in the grid.)

        [AcceptVerbs(HttpVerbs.Post)]
        public ActionResult AddMdGivingData([DataSourceRequest] DataSourceRequest request, MDGIVING mdGiving)
        {

        }

Any ideas?

Thank you very much for your help.

Andrew  

1 Answer, 1 is accepted

Sort by
0
Anton Mironov
Telerik team
answered on 09 Aug 2023, 08:21 AM

Hi Andrew,

Thank you for the provided information. 

Yes, you are totally correct - the described behavior is not expected.

In order to try my best to resolve it, I will need further information and code. The fastest route to getting you up and running is if you could provide a runnable, isolated, sample project. Examining this project will let us replicate the issue locally and further troubleshoot it.

Looking forward to hearing back from you.

Kind Regards,
Anton Mironov
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages. If you're new to the Telerik family, be sure to check out our getting started resources, as well as the only REPL playground for creating, saving, running, and sharing server-side code.

Andrew
Top achievements
Rank 1
commented on 09 Aug 2023, 03:02 PM

Hello Anton,

Thank you very much for your reply.

We fixed this problem. We need to stringify the data object.

Thanks again.

Andrew

Anton Mironov
Telerik team
commented on 14 Aug 2023, 08:11 AM

Hi Andrew,

Thank you for sharing the resolution approach.

If further assistance or information is needed, do not hesitate to contact me and the team.


Best Regards,
Anton Mironov

Tags
Grid
Asked by
Andrew
Top achievements
Rank 1
Answers by
Anton Mironov
Telerik team
Share this question
or