I have a situation where I need to set the date and time in a hidden field through javascript. I have to catch this hidden field value as a parameter of my server action.
The problem is that I donโt know which format to use for writing datetime in a hidden field. I googled a lot and did not find a table explaining which datetime formats are compatible with the default model binding mechanism.
I tried using iso datetime: "yyyy-mm-dd'T'HH: MM: ss" and iso utc datetime: "UTC: yyyy-mm-dd'T'HH: MM: ss'Z '" without success ".
PS: I know that ASP.NET MVC takes into account whether it is GET or POST when working with formats and cultures. My culture is PT-BR, and this is POST.
source share