Jusser Jusser - 4 months ago 41
AngularJS Question

How do I change the uib-datepicker-popup button bar?

I'm using uib-datepicker-popup and I would like to change the button bar. Right now it uses

.btn-info
,
.btn-danger
and
.btn-success
for the 'today', 'clear' and 'close' buttons respectively. How could I change these to be other button classes, such as
.btn-default
(with hopefully not much work)?

Answer

You can modify the datepicker template. Default one is here: https://github.com/angular-ui/bootstrap/blob/master/template/datepickerPopup/popup.html

Use the templateUrl directive like this:

<input type="text" uib-datepicker-popup="MM/dd/yyyy" template-url="path/to/template.html" />
Comments