Microsoft ASP.NET MVC's JSON serializer converts date time values to something like "\/Date(1239018869048)\/"
.
I have a component on the client side that uses this format to show a date-time picker. However, create date time values from different sources:
- From JSON returned by a controller's action
- From some values rendered in a Razor page
The first source creates date times of the required format, that is, "\/Date(1239018869048)\/"
. However, the second source renders date time in a human-readable format, that is, 7/31/2013 10:03:53 AM
.
Is there anyway to create JSON serialized date formats in Razor pages?