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

Commit b150853

Browse files
committed
Updated README.md
1 parent e3a6c1d commit b150853

File tree

1 file changed

+12
-50
lines changed

1 file changed

+12
-50
lines changed

README.md

Lines changed: 12 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ angular.module('app', [
6262
]);
6363
```
6464

65-
6665
Call the directive wherever you want in your html page
6766

6867
```html
@@ -72,57 +71,20 @@ Call the directive wherever you want in your html page
7271
```
7372
> By default the ng-model will show a Javascript Date() Object inside your input, you can use the options below to set your preferred date format to.
7473
75-
##Options
76-
Angular datepicker allows you to use some options via `attribute` data
77-
78-
####Date format
79-
You can use all the Angularjs `$date` filter date formats (that can be found [here](https://docs.angularjs.org/api/ng/filter/date))
80-
81-
```html
82-
<datepicker date-format="{{pattern}}">
83-
<input ng-model="date" type="text"/>
84-
</datepicker>
85-
```
86-
87-
####Date limits
88-
You can set date limits using `date-min-limit=""` and `date-max-limit=""` attribute data ( you can use all the accepted date formats by the javascript `new Date()`)
8974

90-
```html
91-
<datepicker date-min-limit="2014/08/11" date-max-limit="2018/07/14">
92-
<input ng-model="date" type="text"/>
93-
</datepicker>
94-
```
75+
##DOC
9576

96-
####Default date
97-
You can set date to be displayed by default with `date-set=""` attribute data ( you can use all the accepted date formats by the javascript `new Date()`)
98-
99-
```html
100-
<datepicker date-set="2018/07/14">
101-
<input ng-model="date" type="text"/>
102-
</datepicker>
103-
104-
<datepicker date-set="{{myModel.date}}">
105-
<input ng-model="myModel.date" type="text"/>
106-
</datepicker>
107-
```
108-
109-
####Default date hidden on start
110-
You can set default date to be shown only in calendar and not in input field by using the `date-set-hidden="true"` option.
111-
112-
```html
113-
<datepicker date-set="2018/07/14" date-set-hidden="true">
114-
<input ng-model="date" type="text"/>
115-
</datepicker>
116-
```
117-
118-
####Date disabled
119-
You can disable specific dates using the **date-disabled-dates=""** attribute and an _Array_ of dates you want to disable.
120-
121-
```html
122-
<datepicker date-disabled-dates="['2018/07/14', '2018/09/07']">
123-
<input ng-model="date" type="text"/>
124-
</datepicker>
125-
```
77+
Option | Type | Default | Description
78+
------------- | ------------- | ------------- | -------------
79+
date-set="" | String | false | Set a default date to show and init datepicker
80+
date-format="" | String | String(new Date()) | Set the date format you want to use, see the list [here](https://docs.angularjs.org/api/ng/filter/date)
81+
date-min-limit="" | String | false | Set a minimum date limit - you can use all the accepted date formats by the javascript `new Date()`
82+
date-max-limit="" | String | false | Set a maximum date limit - you can use all the accepted date formats by the javascript `new Date()`
83+
date-set-hidden="" | String(Boolean) | false | Set the default date to be shown only in calendar and not in the input field
84+
date-disabled-dates="" | String([Date(), Date(), ...]) | false | Disable specific dates using an _Array_ of dates
85+
86+
##Options
87+
Angular datepicker allows you to use some options via `attribute` data
12688

12789

12890
####Custom titles

0 commit comments

Comments
 (0)