This question is locked. New answers and comments are not allowed.
I have the following code in my view.
<%= Html.Hidden("UserId", ViewData["userId"], new { UserId = ViewData["userId"] })%>
<label for="DatePicker-input">Task Entry Date (Required)</label>
<%= Html.Telerik()
.DatePicker()
.Name("selDate")
.MinDate((DateTime)ViewData["prgmStartDate"])
.MaxDate((DateTime)ViewData["prgmEndDate"])
.Value((DateTime)ViewData["prgmDefDate"])
%>
<%= Html.ValidationMessage("selDate", "*")%>
If I feed the DatePicker a dates from the Controller,where occasionally .MaxDate = .Value occurs. (In my case, its where the program date is the same date as today, or today is past the program date, either of which I set the value in the controller to be the same date as the max). When that occurs, you get the following error:
Specified argument was out of the range of valid values.
To get around this, I am adding 23 hours to the end of the program date. So technically, Value is always < MaxDate.
Just thought I would let someone know. Seems like a little bug to me.
<%= Html.Hidden("UserId", ViewData["userId"], new { UserId = ViewData["userId"] })%>
<label for="DatePicker-input">Task Entry Date (Required)</label>
<%= Html.Telerik()
.DatePicker()
.Name("selDate")
.MinDate((DateTime)ViewData["prgmStartDate"])
.MaxDate((DateTime)ViewData["prgmEndDate"])
.Value((DateTime)ViewData["prgmDefDate"])
%>
<%= Html.ValidationMessage("selDate", "*")%>
If I feed the DatePicker a dates from the Controller,where occasionally .MaxDate = .Value occurs. (In my case, its where the program date is the same date as today, or today is past the program date, either of which I set the value in the controller to be the same date as the max). When that occurs, you get the following error:
Specified argument was out of the range of valid values.
Parameter name: Date should be less than MinDate and bigger than MaxDate
To get around this, I am adding 23 hours to the end of the program date. So technically, Value is always < MaxDate.
Just thought I would let someone know. Seems like a little bug to me.