This repository was archived by the owner on May 29, 2019. It is now read-only.

Description
Bug description:
The initial value is not set if the element is like input[type='button'] because uibDatepickerPopup only set value when date is selected: popup.js#L215
Plunker
workaround 1: add ngValue diredtive Plunker
workaround 2: create a custom directive Plunker
app.directive('uibDatepickerPopup', ($timeout) => {
return {
restrict: 'A',
require: 'ngModel',
link: (scope, element, attrs, ngModelController) => {
if (attrs.type !== 'button') {
return;
}
$timeout(() => {
element.val(ngModelController.$viewValue);
});
}
};
});
Link to minimally-working plunker that reproduces the issue:
https://plnkr.co/edit/gsPj6jiXDgKHQQqXpUfL?p=preview
Version of Angular, UIBS, and Bootstrap
Angular: 1.5.8 or lower
UIBS: 2.0.0 or lower
Bootstrap: 3.3.7 or lower