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

Commit 54d0342

Browse files
committed
Update datepicker.js
1 parent e21866b commit 54d0342

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

Diff for: src/datepicker/datepicker.js

+9-3
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,9 @@ angular.module('ui.bootstrap.datepicker', ['ui.bootstrap.dateparser', 'ui.bootst
247247
return {
248248
restrict: 'EA',
249249
replace: true,
250-
templateUrl: attrs.templateUrl || 'template/datepicker/day.html',
250+
templateUrl: function(element, attrs) {
251+
return attrs.templateUrl || 'template/datepicker/day.html';
252+
},
251253
require: '^datepicker',
252254
link: function(scope, element, attrs, ctrl) {
253255
scope.showWeeks = ctrl.showWeeks;
@@ -359,7 +361,9 @@ angular.module('ui.bootstrap.datepicker', ['ui.bootstrap.dateparser', 'ui.bootst
359361
return {
360362
restrict: 'EA',
361363
replace: true,
362-
templateUrl: attrs.templateUrl || 'template/datepicker/month.html',
364+
templateUrl: function(element, attrs) {
365+
return attrs.templateUrl || 'template/datepicker/month.html';
366+
},
363367
require: '^datepicker',
364368
link: function(scope, element, attrs, ctrl) {
365369
ctrl.step = { years: 1 };
@@ -417,7 +421,9 @@ angular.module('ui.bootstrap.datepicker', ['ui.bootstrap.dateparser', 'ui.bootst
417421
return {
418422
restrict: 'EA',
419423
replace: true,
420-
templateUrl: attrs.templateUrl || 'template/datepicker/year.html',
424+
templateUrl: function(element, attrs) {
425+
return attrs.templateUrl || 'template/datepicker/year.html';
426+
},
421427
require: '^datepicker',
422428
link: function(scope, element, attrs, ctrl) {
423429
var range = ctrl.yearRange;

0 commit comments

Comments
 (0)