Skip to content

Commit bf86150

Browse files
authored
Update README.md
1 parent 08072b9 commit bf86150

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

README.md

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
This directive is designed to provide easy and intuitive input of moment.js datetime objects.
44

5-
Desgined to be as simple as possible to afford intuitive interactions.
5+
Desgined to be as simple as possible in order to afford intuitive interactions.
66

77
Converted into an angular directive for your convenience :)
88

@@ -27,17 +27,30 @@ angular.module('myApp', [
2727
])
2828
```
2929

30-
3) Use 'datetime-input' directive in a view
30+
3) Use any of the directives in a view
3131

32+
For date input only
3233
```html
33-
<datetime-input start="start" end="end" on-change="print(start, end)"></datetime-input>
34+
<date-input date="date" on-change="print(date)" placeholder="Select date"></date-input>
35+
```
36+
37+
For time input only
38+
```html
39+
<time-input time="time" on-change="print(time)" placeholder="Select time"></date-input>
40+
```
41+
42+
For both date and time input
43+
```html
44+
<datetime-input datetime="datetime" on-change="print(datetime)" placeholder="Select datetime"></datetime-input>
3445
```
3546

3647
### Attributes
3748

3849
|Property | Usage | Default | Required |
3950
|:------------- |:-------------|:-----:|:-----:|
40-
| datetime | moment.js datetime object or a datetime string | none | yes |
51+
| date | moment.js datetime object or a datetime string | none | no |
52+
| time | moment.js datetime object or a datetime string | none | no |
53+
| datetime | moment.js datetime object or a datetime string | none | no |
4154
| placeholder | Placeholder is shown when input object is undefined | none | no |
4255
| on-change | Handler function that is fired on change of datetime object | none | no |
4356

0 commit comments

Comments
 (0)