I have the given model for an html page to accept the date. I am trying to format datefrom and dateto inputbox as "dd/mm/yyyy" format . At the moment , it is showed as just text format. How can I make both column to accept the data as dd/mm/yyyy.
EditDateModel
public class EditDateModel
{
public string FromDate { get; set; }
public string ToDate { get; set; }
}
@model EditDateModel
<table id="tblEntry" class="table table-striped">
<thead>
<tr>
<th>Date From</th>
<th>Date To</th>
</tr>
</thead>
<tbody>
<tr>
<td>@Html.EditorFor(model => model.FromDate, new { htmlAttributes = new { @class = "form-control datepicker w-100" } })</td>
<td>@Html.EditorFor(model => model.ToDate, new { htmlAttributes = new { @class = "form-control w-100" } })</td>
</tr>
</tbody>
</table>