I am writing a C# application and I'm using Entity and MVC. I have a form in my index view, where the user can set a mininum date and a maximum date to be searched. However the format is MM/dd/YYYY. I want to set it to dd/MM/yyyy.
<div class="col-md-6">
<form class="form-horizontal" asp-action="SimpleSearch">
<fieldset>
<legend>Simple Search</legend>
<div class="form-group">
<label for="minDate" class="col-lg-2 control-label">Mini Date</label>
<div class="col-lg-10">
<input type="date" name="minDate" asp-format="{0:dd/MM/yyyy}" class="form-control" />
</div>
</div>
<div class="form-group">
<label for="maxDate" class="col-lg-2 control-label">Max Date</label>
<div class="col-lg-10">
<input type="date" name="maxDate" asp-format="{0:dd/MM/yyyy}" class="form-control" />
</div>
</div>
<div class="form-group">
<div class="col-lg-10 col-lg-offset-2">
<button type="submit" class="btn btn-primary">Submit</button>
</div>
</div>
</fieldset>
</form>
</div>
</div>
I've tried this comand, but it's not working. The date's format does not change.
<input type="date" name="minDate" asp-format="{0:dd/MM/yyyy}" class="form-control" />