I created a datepicker using MVC5 DataType.Date:
[data type (Data Type Date)] Public Date Time Arrival Date {Received; Set; }
Can I set at least available dates for today and disable all past dates?
Alternatively, is there an option to disable a custom range of dates?
I have tried to create a custom DateRangeValidator using that, but with that I get the following error:
Here's my date range validator:
Public Date Time First Date = Date Time Today.Date; // Get Public Datetime Secondend {Receive; Set; } Protected Override ValidationResult if (DATETIME date, ValidationContext validationContext) {// your validation logic (if date> = DbFunctions.TruncateTime (FirstDate)) {return ValidationResult.Success; } And {new verification return ("date is not valid."); }}
No comments:
Post a Comment