Datepicker - Date is Always Required?
See my Plunkr > http://plnkr.co/edit/1iGDEnnpEOtBPymPPiLS?p=preview
Dates are not required on my form, however when a date is entered then cleared out the form is marked invalid and the user cannot submit.
This looks like a legitimate bug - this needs to be rewritten to use ngModel.$validators
@wesleycho , I have a fix to this bug in my forked repo: https://github.com/blendlabs/bootstrap. Should I add tests and submit a PR for this issue?
I am assuming that this is the commit?
Feel free to open a PR - I think this is not quite the correct way to fix this though. The proper fix would change the setting of validity to be in ngModelCtrl.$validators.date and not manually checking $attrs.ngRequired.
moving discussion to PR referenced below
the bug still exists in version 1.3.2 (date is always required for uib-datepicker-popup component)
Bug still exists in version 2.0.1. Is this project still maintained?
Bug still happens on version 2.5.6.
I have an optional datepicker field initialized with null value. When the datepicker is initialized, angular has a $error.date
An null date is an invalid date, but a null value for the model maybe not.