Greater Than or Equal To Today Date validation annotation in MVC3

前端 未结 3 1630
北恋
北恋 2020-12-05 02:53

Has anyone seen an MVC3 data annotation for Date validation that requires a single selected date to be equal to or greater than current date?

If there\'s already a t

3条回答
  •  广开言路
    2020-12-05 03:43

    Simple way to accomplish this task is using CompareValidator.

    The code below uses AjaxControlToolKit's CalendarExtender. Copy the below code to your HTML directive

    
                            
                            
                            
                                                    
                            
    
    

    add the below line in the CSS

    .hiddenbox {display:none;}
    

提交回复
热议问题