This question is locked. New answers and comments are not allowed.
Hi,
I'm using telerik controls version 2010.3.1110.340. Asp.net MVC 3. I'm trying to get the datepicker to validate client side using the required attribute. Unobtrusive javascript is on, and enable client validation - both through web.config. I can't seem to figure out what I'm doing wrong..
Model:
Site.Master top:
Site.Master bottom:
I'm using telerik controls version 2010.3.1110.340. Asp.net MVC 3. I'm trying to get the datepicker to validate client side using the required attribute. Unobtrusive javascript is on, and enable client validation - both through web.config. I can't seem to figure out what I'm doing wrong..
Model:
/// <summary>View:
/// Date of birth
/// </summary>
[DataType(DataType.Date), Required]
public DateTime? DateOfBirth { get; set; }
<div class="editor-field">As you can see I was using an EditorFor but I disabled it to try and figure this out.
<%= Html.Telerik().DatePickerFor(m => m.DateOfBirth) %>
<%-- <%: Html.EditorFor(m => m.DateOfBirth)%>--%>
<%: Html.ValidationMessageFor(m => m.DateOfBirth) %>
</div>
Site.Master top:
<%= Html.Telerik().StyleSheetRegistrar()
.DefaultGroup(group => group
.Add("telerik.common.min.css")
.Add("telerik.vista.min.css")
.Add("telerik.rtl.css"))
%>
Site.Master bottom:
<% Html.Telerik().ScriptRegistrar()
.DefaultGroup(group => group
.Add("jquery.validate.js")
.Add("jquery.validate.unobtrusive.js") .Render(); %>