function parser(viewValue) {
if (viewValue.length === format.length) {
return viewValue;
}
return undefined;
}
The parser logic added to ng-model does not seem right. I am using format="LL" and no min/max date and what it means is that any string of length 2 is considered valid. I am adding moment's isValid() instead.
The parser logic added to ng-model does not seem right. I am using
format="LL"
and no min/max date and what it means is that any string of length 2 is considered valid. I am adding moment's isValid() instead.