Set the time of compare between passed date and CompareTo date.
The datetime against the compare is done. If CompareTo is not set, then comparison is done against actual datetime.
It forces to ignore time part of date by date compare.
Generated using TypeDoc
object
DateCompareValidator
moment
underscore
DateCompareValidator enables to compare date to another date (CompareTo).
CompareTo The datetime against the compare is done. If property is not set, then comparison is done against actual datetime.
IgnoreDate It forces to ignore time part of date by date compare.
//create validator var validator = new dateCompareValidator(); validator.CompareTo = new Date(2000,2,2); validator.CompareOperator = Validation.CompareOperator.LessThanEqual; //less more than month -> return true var result = validator.isAcceptable(new Date(2000,1,1)); //equal up to days -> return true var result = validator.isAcceptable(new Date(2000,2,2));