This repository was archived by the owner on Feb 18, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +17
-3
lines changed
Expand file tree Collapse file tree 1 file changed +17
-3
lines changed Original file line number Diff line number Diff line change 1111 return {
1212 'restrict' : 'E' ,
1313 'scope' : {
14- 'dateSet' : '@'
14+ 'dateSet' : '@' ,
15+ 'dateMinLimit' : '@' ,
16+ 'dateMaxLimit' : '@'
1517 } ,
1618 'link' : function linkingFunction ( $scope , element , attr ) {
1719 //get child input
2325 , prevButton = attr . buttonPrev || defaultPrevButton
2426 , nextButton = attr . buttonNext || defaultNextButton
2527 , dateFormat = attr . dateFormat
26- , dateMinLimit = attr . dateMinLimit || undefined
27- , dateMaxLimit = attr . dateMaxLimit || undefined
28+ , dateMinLimit
29+ , dateMaxLimit
2830 , date = new Date ( )
2931 , isMouseOn = false
3032 , isMouseOnInput = false
9193 }
9294 } ) ;
9395
96+ $scope . $watch ( 'dateMinLimit' , function ( value ) {
97+ if ( value ) {
98+ dateMinLimit = value ;
99+ }
100+ } ) ;
101+
102+ $scope . $watch ( 'dateMaxLimit' , function ( value ) {
103+ if ( value ) {
104+ dateMaxLimit = value ;
105+ }
106+ } ) ;
107+
94108 $scope . month = $filter ( 'date' ) ( date , 'MMMM' ) ; //December-November like
95109 $scope . monthNumber = Number ( $filter ( 'date' ) ( date , 'MM' ) ) ; // 01-12 like
96110 $scope . day = Number ( $filter ( 'date' ) ( date , 'dd' ) ) ; //01-31 like
You can’t perform that action at this time.
0 commit comments