@@ -458,7 +458,9 @@ angular.module('ui.bootstrap.datepicker', ['ui.bootstrap.dateparser', 'ui.bootst
458
458
. directive ( 'uibDaypicker' , function ( ) {
459
459
return {
460
460
replace : true ,
461
- templateUrl : 'template/datepicker/day.html' ,
461
+ templateUrl : function ( element , attrs ) {
462
+ return attrs . templateUrl || 'template/datepicker/day.html' ;
463
+ } ,
462
464
require : [ '^?uibDatepicker' , 'uibDaypicker' , '^?datepicker' ] ,
463
465
controller : 'UibDaypickerController' ,
464
466
link : function ( scope , element , attrs , ctrls ) {
@@ -473,7 +475,9 @@ angular.module('ui.bootstrap.datepicker', ['ui.bootstrap.dateparser', 'ui.bootst
473
475
. directive ( 'uibMonthpicker' , function ( ) {
474
476
return {
475
477
replace : true ,
476
- templateUrl : 'template/datepicker/month.html' ,
478
+ templateUrl : function ( element , attrs ) {
479
+ return attrs . templateUrl || 'template/datepicker/month.html' ;
480
+ } ,
477
481
require : [ '^?uibDatepicker' , 'uibMonthpicker' , '^?datepicker' ] ,
478
482
controller : 'UibMonthpickerController' ,
479
483
link : function ( scope , element , attrs , ctrls ) {
@@ -488,7 +492,9 @@ angular.module('ui.bootstrap.datepicker', ['ui.bootstrap.dateparser', 'ui.bootst
488
492
. directive ( 'uibYearpicker' , function ( ) {
489
493
return {
490
494
replace : true ,
491
- templateUrl : 'template/datepicker/year.html' ,
495
+ templateUrl : function ( element , attrs ) {
496
+ return attrs . templateUrl || 'template/datepicker/year.html' ;
497
+ } ,
492
498
require : [ '^?uibDatepicker' , 'uibYearpicker' , '^?datepicker' ] ,
493
499
controller : 'UibYearpickerController' ,
494
500
link : function ( scope , element , attrs , ctrls ) {
@@ -1034,7 +1040,7 @@ angular.module('ui.bootstrap.datepicker')
1034
1040
var focusElement = function ( ) {
1035
1041
self . element [ 0 ] . focus ( ) ;
1036
1042
} ;
1037
-
1043
+
1038
1044
$scope . $on ( 'uib:datepicker.focus' , focusElement ) ;
1039
1045
1040
1046
$scope . keydown = function ( evt ) {
0 commit comments