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

Commit e21866b

Browse files
committed
Update datepicker.js
Allow for custom templates for day / month / year pickers
1 parent bba0e68 commit e21866b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: src/datepicker/datepicker.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ angular.module('ui.bootstrap.datepicker', ['ui.bootstrap.dateparser', 'ui.bootst
247247
return {
248248
restrict: 'EA',
249249
replace: true,
250-
templateUrl: 'template/datepicker/day.html',
250+
templateUrl: attrs.templateUrl || 'template/datepicker/day.html',
251251
require: '^datepicker',
252252
link: function(scope, element, attrs, ctrl) {
253253
scope.showWeeks = ctrl.showWeeks;
@@ -359,7 +359,7 @@ angular.module('ui.bootstrap.datepicker', ['ui.bootstrap.dateparser', 'ui.bootst
359359
return {
360360
restrict: 'EA',
361361
replace: true,
362-
templateUrl: 'template/datepicker/month.html',
362+
templateUrl: attrs.templateUrl || 'template/datepicker/month.html',
363363
require: '^datepicker',
364364
link: function(scope, element, attrs, ctrl) {
365365
ctrl.step = { years: 1 };
@@ -417,7 +417,7 @@ angular.module('ui.bootstrap.datepicker', ['ui.bootstrap.dateparser', 'ui.bootst
417417
return {
418418
restrict: 'EA',
419419
replace: true,
420-
templateUrl: 'template/datepicker/year.html',
420+
templateUrl: attrs.templateUrl || 'template/datepicker/year.html',
421421
require: '^datepicker',
422422
link: function(scope, element, attrs, ctrl) {
423423
var range = ctrl.yearRange;

0 commit comments

Comments
 (0)