This method works for me.
First copy popup.html,datepicker.html,day.html,month.html,year.html files to your project. Let's assume I have added those under the datepicker folder and datepickerPopup folder
datepicker folder
- datepicker.html
- day.html
- month.html
- year.html
datepickerPopup folder
Next, you must add both datepicker-template-url and datepicker-popup-template-url for the input element
<input type="text" class="form-control"
uib-datepicker-popup
datepicker-template-url="libs/js/uib/template/datepicker/datepicker.html"
datepicker-popup-template-url="libs/js/uib/template/datepickerPopup/popup.html"
ng-keypress="$event.preventDefault()"
/>
Also if you need to add custom HTML for the day, month and year selector you must add template-url for each inside the datepicker.html
<div ng-switch="datepickerMode">
<div template-url="libs/js/uib/template/datepicker/day.html" uib-daypicker ng-switch-when="day" tabindex="0" class="uib-daypicker">
</div>
<div template-url="libs/js/uib/template/datepicker/month.html" uib-monthpicker ng-switch-when="month" tabindex="0" class="uib-monthpicker"></div>
<div template-url="libs/js/uib/template/datepicker/year.html" uib-yearpicker ng-switch-when="year" tabindex="0" class="uib-yearpicker"></div>
</div>
Then you can customize month, day or year HTML files and those changes will be appear in the UI. As a example I have changed month changer in the day.html
<table role="grid" aria-labelledby="{{::uniqueId}}-title" aria-activedescendant="{{activeDateId}}">
<thead>
<tr>
<th>
<button type="button" class="btn btn-default btn-sm pull-left uib-left" ng-click="move(-1)" tabindex="-1"><i
aria-hidden="true" class="fa fa-chevron-left"></i><span class="sr-only">previous</span></button>
</th>
<th colspan="{{::5 + showWeeks}}">
<button id="{{::uniqueId}}-title" role="heading" aria-live="assertive" aria-atomic="true" type="button"
style="background: #2a7abf;color: white;"
class="btn btn-default btn-sm uib-title" ng-click="toggleMode()"
ng-disabled="datepickerMode === maxMode" tabindex="-1">
<strong style="display: flex;justify-content: center;">{{title}}
<i style="margin-left: 10px;font-size: 18px;" class="fa fa-caret-down" aria-hidden="true"></i>
</strong>
</button>
</th>
<th>
<button type="button" class="btn btn-default btn-sm pull-right uib-right" ng-click="move(1)" tabindex="-1">
<i aria-hidden="true" class="fa fa-chevron-right"></i><span class="sr-only">next</span></button>
</th>
</tr>
<tr>
<th ng-if="showWeeks" class="text-center"></th>
<th ng-repeat="label in ::labels track by $index" class="text-center"><small aria-label="{{::label.full}}">{{::label.abbr}}</small>
</th>
</tr>
</thead>
<tbody>
<tr class="uib-weeks" ng-repeat="row in rows track by $index" role="row">
<td ng-if="showWeeks" class="text-center h6"><em>{{ weekNumbers[$index] }}</em></td>
<td ng-repeat="dt in row" class="uib-day text-center" role="gridcell"
id="{{::dt.uid}}"
ng-class="::dt.customClass">
<button type="button" class="btn btn-default btn-sm"
uib-is-class="
'btn-info' for selectedDt,
'active' for activeDt
on dt"
ng-click="select(dt.date)"
ng-disabled="::dt.disabled"
tabindex="-1"><span ng-class="::{'text-muted': dt.secondary, 'text-info': dt.current}">{{::dt.label}}</span>
</button>
</td>
</tr>
</tbody>
</table>
