Closed iazureenaa closed 3 years ago
try this way instead:
$(document).ready(function() { $("input.datepicker").datepicker({ format: "m/d/yyyy", }); });
When inspect, the date field:
I was informed that data-val-date comes from unobtrusive validation
pasting here updated info from @iazureenaa
"saya track ada 3 files yang guna date format: 1._EntryForm (dekat kamu as form (add.cshtml)) 2.Entry (Models folder)
for date ni saya nak guna ToString utk customizekan date"
Understanding the bug meaning -
Date field for today, future and a week is invalid for date (suspected because of MM and dd not in the same place) - meaning 05/31 is read as dd/MM.
Fixed by adding culture inside system.web (web.config)
Solution: https://stackoverflow.com/questions/41631803/date-format-to-dd-mm-yyyy-in-textboxfor-type-date
Observation: