File tree Expand file tree Collapse file tree 1 file changed +17
-4
lines changed Expand file tree Collapse file tree 1 file changed +17
-4
lines changed Original file line number Diff line number Diff line change 2
2
3
3
This directive is designed to provide easy and intuitive input of moment.js datetime objects.
4
4
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.
6
6
7
7
Converted into an angular directive for your convenience :)
8
8
@@ -27,17 +27,30 @@ angular.module('myApp', [
27
27
])
28
28
```
29
29
30
- 3 ) Use 'datetime-input' directive in a view
30
+ 3 ) Use any of the directives in a view
31
31
32
+ For date input only
32
33
``` 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 >
34
45
```
35
46
36
47
### Attributes
37
48
38
49
| Property | Usage | Default | Required |
39
50
| :------------- | :-------------| :-----:| :-----:|
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 |
41
54
| placeholder | Placeholder is shown when input object is undefined | none | no |
42
55
| on-change | Handler function that is fired on change of datetime object | none | no |
43
56
You can’t perform that action at this time.
0 commit comments