Display Date in edit mode in asp.net mvc
Display Date in edit mode in asp.net mvc
1- In database table data type is Date e.g date_invoice
2- in DTO or class property is as below
public DateTime date_invoice { get; set; }
3- in html view html is like this
@Html.TextBoxFor(model => model.date_invoice, "{0:yyyy-MM-dd}", new { @class = "form-control", type = "date" })
Moslty Date is not dispalyed in edit mode reason is format of date that is "{0:yyyy-MM-dd}" and type of box is date
- Date issue in edit mode in asp.net mvc
- Date formatting
- Date format
- Display date in edit mode.
Share This with your friend by choosing any social account