Skip to content
This repository was archived by the owner on Feb 18, 2022. It is now read-only.

Commit 050bbbe

Browse files
committed
little changes
1 parent 1142689 commit 050bbbe

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,11 @@ 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.
107+
####Default date hidden on start
108+
You can set default date to be shown only in calendar and not in input field by using the `date-set-hidden="true"` option.
109109

110110
```html
111-
<datepicker date-set="2018/07/14" hide-default-date="true">
111+
<datepicker date-set="2018/07/14" date-set-hidden="true">
112112
<input ng-model="date" type="text"/>
113113
</datepicker>
114114
```
@@ -133,7 +133,7 @@ You can set the titles for the month and year selectors with the **date-year-tit
133133
<datepicker date-year-title="selected title">
134134
<input ng-model="date"/>
135135
</datepicker>
136-
136+
137137
####Custom buttons
138138
You can customize the calendar navigation buttons content, let's make an example while using [FontAwesome](http://fontawesome.io)
139139

@@ -153,7 +153,7 @@ You can also set the titles for the left and right arrows with **button-next-tit
153153
</datepicker>
154154

155155
####Input as grandchild
156-
Sometimes you cannot put date input as a first child of datepicker. In this case you may use `selector=""` to point to the CSS class of the input. Below example with using Twitter Bootstrap and FontAwesome
156+
Sometimes you cannot put date input as a first child of datepicker. In this case you may use `selector=""` to point to the CSS class of the input. Below example with using Twitter Bootstrap and FontAwesome
157157

158158
```html
159159
<datepicker date-format="yyyy-MM-dd" selector="form-control">

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<div class="separator50"></div>
2020
<div class="col6 offset-left2">
2121
<div class="col3">
22-
<div datepicker>
22+
<div datepicker date-set="2011/07/05">
2323
<input ng-model="date1" type="text" class="angular-datepicker-input"/>
2424
</div>
2525
Date 1 is: {{date1}}

src/js/angular-datepicker.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
'buttonNextTitle': '@',
2121
'buttonPrevTitle': '@',
2222
'dateDisabledDates': '@',
23-
'hideDefaultDate': '@'
23+
'dateSetHidden': '@'
2424
},
2525
'link': function linkingFunction($scope, element, attr) {
2626
//get child input
@@ -114,7 +114,7 @@
114114
$scope.day = Number($filter('date')(date, 'dd')); //01-31 like
115115
$scope.year = Number($filter('date')(date, 'yyyy'));//2014 like
116116
$scope.setDaysInMonth($scope.monthNumber, $scope.year);
117-
if ($scope.hideDefaultDate !== 'true') {
117+
if ($scope.dateSetHidden !== 'true') {
118118
$scope.setInputValue();
119119
}
120120
}
@@ -134,7 +134,6 @@
134134
}
135135
});
136136

137-
138137
$scope.month = $filter('date')(date, 'MMMM');//December-November like
139138
$scope.monthNumber = Number($filter('date')(date, 'MM')); // 01-12 like
140139
$scope.day = Number($filter('date')(date, 'dd')); //01-31 like

0 commit comments

Comments
 (0)