169
rated 0 times
[
176]
[
7]
/ answers: 1 / hits: 20040
/ 10 Years ago, fri, august 29, 2014, 12:00:00
I found a similar question here but that do not work for my case. Please look at the screen shot below. When I render data in an Edit form, all data was set to the controls properly except the highlighted date field. When I inspect the element, I found that the value is there but for some reason it is not showing in the field.
Here is the code I used to set value into this date field. I tried both yyyy-MM-dd & MM/dd/yyyy format but none worked.
<td>Joining Date</td>
<td>
@{
if(Model.JoiningDate != null)
{
<input id=txtJoiningDate type=date style=width: 100%; [email protected]({0:MM/dd/yyyy},Model.JoiningDate.Value) />
}
else
{
<input id=txtJoiningDate type=date style=width: 100%; />
}
}
</td>
Edit
More From » asp.net-mvc