Closed lancegliser closed 9 years ago
Oh, I also fixed a tiny html template issue. var div = angular.element('
'); was previously missing the closing >.Does it mean this requires ngModel? How about ngModel as optional?
How about instead of future-only, why don't we have min-date, max-date, min-time, max-time and make it not available if not within range?
Users may have requirement of 'this year only', 'this month only', or 'work hours only' kind of cases.
RE: "Does it mean this requires ngModel? How about ngModel as optional?" Without defining that it requires a controller in the link function, you aren't provided the 4th argument of ctrl that we need for adding validation watchers.
Regarding other validation attributes, that makes perfect sense. I expected others would have their own, after it was clear how to add them. My use case was just more simple.
ok i will merge your request as it is, and make some changes on it.
future-only
may change to min-date="today"
though.
I had need of future based date validation to accompany this directive. I've added basic date validation, along with future. Perhaps it should be abstracted a bit, but it will let you review the idea.
One important note is that an ng-model dependency has been introduced!