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

Commit 5e170a9

Browse files
committed
Updated README.md
1 parent b150853 commit 5e170a9

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

README.md

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -82,21 +82,24 @@ date-min-limit="" | String | false | Set a minimum date limit - you can use all
8282
date-max-limit="" | String | false | Set a maximum date limit - you can use all the accepted date formats by the javascript `new Date()`
8383
date-set-hidden="" | String(Boolean) | false | Set the default date to be shown only in calendar and not in the input field
8484
date-disabled-dates="" | String([Date(), Date(), ...]) | false | Disable specific dates using an _Array_ of dates
85+
date-refocus="" | String(Boolean) | false | Set the datepicker to re-focus the input after selecting a date
8586

8687
##Options
8788
Angular datepicker allows you to use some options via `attribute` data
8889

89-
9090
####Custom titles
91+
9192
You can set the titles for the month and year selectors with the **date-year-title=""** and **date-month-title=""** data attributes (default to is _"select month"_ and _"select year"_)
9293

94+
```html
9395
<datepicker date-month-title="selected year">
9496
<input ng-model="date"/>
9597
</datepicker>
9698

9799
<datepicker date-year-title="selected title">
98100
<input ng-model="date"/>
99101
</datepicker>
102+
```
100103

101104
####Custom buttons
102105
You can customize the calendar navigation buttons content, let's make an example while using [FontAwesome](http://fontawesome.io)
@@ -106,15 +109,19 @@ You can customize the calendar navigation buttons content, let's make an example
106109
<input ng-model="date" type="text"/>
107110
</datepicker>
108111
```
112+
109113
####Custom buttons titles for arrows
110114
You can also set the titles for the left and right arrows with **button-next-title=""** for the right and **button-prev-title=""** for the left. By default they are labeled _"next"_ and _"prev"_.
115+
116+
```html
111117
<datepicker button-prev-title="previous month">
112118
<input ng-model="date"/>
113119
</datepicker>
114120

115121
<datepicker button-next-title="next month">
116122
<input ng-model="date" type="text"/>
117123
</datepicker>
124+
```
118125

119126
####Input as grandchild
120127
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
@@ -137,15 +144,6 @@ You have an option to make the datepicker visible when it loads with `visible-on
137144
</datepicker>
138145
```
139146

140-
####Re-focus input after selecting date
141-
Re-focus input after selecting a date with `date-refocus` attribute.
142-
143-
```html
144-
<datepicker date-refocus>
145-
<input placeholder="Choose a date"/>
146-
</datepicker>
147-
```
148-
149147
### Example
150148

151149
[Live demo](https://720kb.github.io/angular-datepicker)

0 commit comments

Comments
 (0)