Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Member
363 Points
183 Posts
Oct 19, 2011 07:32 AM|LINK
Hi, I did install it.. but I still cant get any validation message.. is it a must to use Html.DateTimeFor for the validation to work? If yes, do you have any idea how to assign a class to Html.DateTimeFor helper like what I did for the EditorFor?
<div class="editor-field"> @Html.EditorFor(model => model.ExpiryDate, new { @class = "expirydate" }) @Html.ValidationMessageFor(model => model.ExpiryDate) </div>
And is it any additional steps needed because I am using a datepicker?
Really thanks for your help....
yenni104
Member
363 Points
183 Posts
Re: Custom DateTime Validation for MVC 3 unobtrusive client side validation
Oct 19, 2011 07:32 AM|LINK
Hi, I did install it.. but I still cant get any validation message.. is it a must to use Html.DateTimeFor for the validation to work? If yes, do you have any idea how to assign a class to Html.DateTimeFor helper like what I did for the EditorFor?
<div class="editor-field">
@Html.EditorFor(model => model.ExpiryDate, new { @class = "expirydate" })
@Html.ValidationMessageFor(model => model.ExpiryDate)
</div>
And is it any additional steps needed because I am using a datepicker?
Really thanks for your help....