I fill in a DateTime field with input type="date"
and I can write it to the database normally.
When I retrieve the bank record and try to display it with the same input type, it shows me the field filled with 01/01/0001
. If I examine the source code of the page, I find that the date retrieved is there, as it was written to the database, but in dd/MM/yyyy
format.
I know that input type=date
needs to receive the date in yyyy-MM-dd
format, but I do not know how to do that. What am I doing wrong?