问题
I updated to UI Bootstrap 0.11.0 and my datepickers stopped appearing as they should. I have a plunker that demonstrates it at here. Very simply, I have:
<input ng-model="formData.dueDate" type="text" id="dueDate" name="dueDate"
class="form-control" datepicker-popup="MM-dd-yyyy"
datepicker-append-to-body="true">
The datepicker pops up correctly using UI Bootstrap 0.10.0 but not with the lastest version. I do not see any errors in the console.
This leads me to believe I was possibly using the datepicker incorrectly in the previous version or they've had a regression. Am I doing something wrong here?
Update:
I've included the answer below. Show on focus and show on click have been removed from UI Bootstrap datepicker.
回答1:
The feature was removed from UI Bootstrap. See https://github.com/angular-ui/bootstrap/issues/2149 for more information. I have created another Plunk to demonstrate the workaround at http://plnkr.co/edit/ct46CK6NRb9FWdpzfQpI?p=preview.
回答2:
Looks like you aren't the only one with the issue. I suggest leaving your feedback on the Github project:
See: https://github.com/angular-ui/bootstrap/issues/2098
来源:https://stackoverflow.com/questions/23479674/why-did-my-ui-bootstrap-datepicker-popup-stop-working