I am using jquery datepicker on my view model
Here is my view:
@Html.TextBoxFor(o => o.JobStartDate, new { id = \"dt1\", @class = \"input-block-le
You will need to create a custom validator. You need to modify your property to take a string value instead like this
public string JobStartDate {get; set; }
You will then need to create your custom validator like this
public class CheckDateAttribute : ValidationAttribute
{
protected override ValidationResult IsValid(object value, ValidationContext validationContext) {
// Validate your Date here
}
}
After this you will just decorate your property as such -
[CheckDate]
public string JobStartDate {get; set;}
Here is a good tutorial on custom validators