I would like to have a datepicker popup upon clicking a button using the Angular UI Bootstrap library's components.
There are examples of both on the Angular UI Boostrap website but I don't see a way to combine them. I don't like the idea of placing the Datepicker div
as an attribute value for the popup
directive's text.
I also tried to use ng-show
on the Datepicker div
but I can't that to work either.
Here's the code I have at the moment.
<div ng-controller="DatepickerCtrl" class="input-append">
<input class="input-small ng-pristine ng-valid"
type="text"
ng-value="dt" />
<button type="button"
class="btn"
popover-placement="right"
ng-click"showDatePicker=true" // the show when clicked strategy
popover="On the Right!"> // Don't see a way to make this encapsulate a div
<i class="icon-calendar"></i>
</button>
<datepicker ng-model="dt"
ng-show="showDatePicker"
starting-day="1"
date-disabled="disabled(date, mode)"
min="minDate" max="'2015-06-22'">
</datepicker>
</div>
I don't really like the ng-show
strategy. Would rather have it be a popover but I assume there are ways to do that better too so I wouldn't mind either.