Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I have got below model date property that I need to validate for minimum is today date .... the property is given below...

[UIHint("Date")]

[DisplayFormat(DataFormatString = "{0:MM/dd/yyyy}", ApplyFormatInEditMode = true)]
[Required(ErrorMessage="Required")]
public DateTime? DeliveryDate { set; get; } 

I am not able to find the way to validate date property, but using range attributes withy datetime also not a recommended one......due to hard coded values....

is there any other approach to do validate date time model property that will validate default should be today date .....

would any one please help on this, that would be very grateful to me..... many thanks in advance......

I am using kendo ui datetimepicker for this purpose ....

share|improve this question
    
I thing this below link can help you [Date validation][1] [Compare Two Date][2] [1]: stackoverflow.com/questions/24362706/… [2]: stackoverflow.com/questions/7025198/… –  P John Raj Jun 23 at 12:17
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.