Reputation: 339
<td colspan="2"><% Html.jQuery().DatePicker()
.Name("birth_date")
.DateFormat("dd-mm-yy")
.MaximumValue(DateTime.Now.AddYears(-15))
.MinimumValue(DateTime.Now.AddYears(-100))
.NavigationAsDateFormat(true)
.Value(Model.birth_date)
.Render(); %></td>
by default it shows 01-01-001, I want to set the default date.
Upvotes: 1
Views: 568
Reputation: 339
<%Model.birth_date = DateTime.Now.AddYears(-15) ; %>
This got me the desired result
Upvotes: 0
Reputation: 19252
Set the Model.birth_date
value, its default value may be is DateTime.MinDate
. So, that's why it shows 01-01-001
.
Upvotes: 1