You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Native AngularJS directive that allows user input of a date/time value. Valid dates are displayed in specified format, but input may be in any supported format.
* AngularJS 1.1.3 or higher (Not tested with 1.0.x)
12
+
* MomentJS 2.1.x or higher
13
+
14
+
#Testing
15
+
We use karma and jshint to ensure the quality of the code. The easiest way to run these checks is to use grunt:
16
+
17
+
```
18
+
npm install -g grunt-cli
19
+
npm install bower grunt
20
+
```
21
+
22
+
The karma task will try to open Chrome as a browser in which to run the tests. Make sure this is available or change the configuration in test\test.config.js
23
+
24
+
#Usage
25
+
We use bower for dependency management. Add
26
+
27
+
```json
28
+
dependencies: {
29
+
"angular-date-time-input": "latest"
30
+
}
31
+
```
32
+
33
+
To your bower.json file. Then run
34
+
35
+
```html
36
+
bower install
37
+
```
38
+
39
+
This will copy the angular-date-time-input files into your components folder, along with its dependencies.
<p>NB: ANY date format that moment can parse into a date will be valid input regardless of the format you specify. All of the following are valid dates.
52
+
There are other date variations that are supported depending on the i18n support you loaded with moment.js</p>
53
+
<ul>
54
+
<li>1970-10-10</li>
55
+
<li>1970-Oct-10</li>
56
+
<li>1970-Oct-10 1:00 pm</li>
57
+
<li>1970-Oct-10 18:00</li>
58
+
<li>Oct 10</li>
59
+
<li>1970 10</li>
60
+
<li>70 10</li>
61
+
</ul>
62
+
63
+
<p>Any invalid dates will have a ng-invalid class assigned by Angular</p>
"description": "This angular directive allows users to manually enter date-time values in a variety of formats but displays the date value in the specified format.",
0 commit comments