This repository was archived by the owner on Feb 18, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +15
-3
lines changed Expand file tree Collapse file tree 2 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -104,6 +104,15 @@ You can set date to be displayed by default with `date-set=""` attribute data (
104104</datepicker >
105105```
106106
107+ ####Default date not to be visible in input
108+ You can set default date only to be set in calendar, not in input field. To be used with ` date-set="" ` option.
109+
110+ ``` html
111+ <datepicker date-set =" 2018/07/14" hide-default-date =" true" >
112+ <input ng-model =" date" type =" text" />
113+ </datepicker >
114+ ```
115+
107116####Date disabled
108117You can disable specific dates using the ** date-disabled-dates=""** attribute and an _ Array_ of dates you want to disable.
109118
Original file line number Diff line number Diff line change 1919 'dateYearTitle' : '@' ,
2020 'buttonNextTitle' : '@' ,
2121 'buttonPrevTitle' : '@' ,
22- 'dateDisabledDates' : '@'
22+ 'dateDisabledDates' : '@' ,
23+ 'hideDefaultDate' : '@'
2324 } ,
2425 'link' : function linkingFunction ( $scope , element , attr ) {
2526 //get child input
112113 $scope . monthNumber = Number ( $filter ( 'date' ) ( date , 'MM' ) ) ; // 01-12 like
113114 $scope . day = Number ( $filter ( 'date' ) ( date , 'dd' ) ) ; //01-31 like
114115 $scope . year = Number ( $filter ( 'date' ) ( date , 'yyyy' ) ) ; //2014 like
115- $scope . setDaysInMonth ( $scope . monthNumber , $scope . year ) ;
116- $scope . setInputValue ( ) ;
116+ $scope . setDaysInMonth ( $scope . monthNumber , $scope . year ) ;
117+ if ( $scope . hideDefaultDate !== 'true' ) {
118+ $scope . setInputValue ( ) ;
119+ }
117120 }
118121 } ) ;
119122
You can’t perform that action at this time.
0 commit comments