@@ -14,27 +14,6 @@ Native AngularJS datetime picker directive styled by Twitter Bootstrap 3
14
14
15
15
[ Home / demo page] ( http://dalelotts.github.io/angular-bootstrap-datetimepicker/ )
16
16
17
- # Upgrading to 0.3.x
18
-
19
- <code >weekStart</code > has been removed. This directive uses the locale aware
20
- [ moment.js day of week] ( http://momentjs.com/docs/#/get-set/weekday/ ) to
21
- determine which day is the first day of the week. If you would like a first
22
- day of week that is not standard for the locale you can create a
23
- [ custom locale] ( http://momentjs.com/docs/#/customization/ )
24
-
25
- ## Easier to control width
26
-
27
- The width of the entire control is set in css, which you can easily override.
28
-
29
- ## Better localization support
30
-
31
- This directive uses localized date formats when available. One exception is the title
32
- of the month view - moment does not (yet) have a localized format for month and year.
33
-
34
- # (Almost) Complete re-write
35
-
36
- This project started as an AngularJS specific re-write of the [ bootstrap-datetimepicker project] ( https://github.com/smalot/bootstrap-datetimepicker ) .
37
- Only the CSS file from the bootstrap-datetimepicker project was re-used.
38
17
39
18
#Dependencies
40
19
@@ -47,6 +26,8 @@ optional:
47
26
* bootstrap's dropdown component (` dropdowns.less ` )
48
27
49
28
#Testing
29
+ This directive was written using TDD and all enhancements and changes have related tests.
30
+
50
31
We use karma and jshint to ensure the quality of the code. The easiest way to run these checks is to use gulp:
51
32
52
33
```
@@ -164,6 +145,12 @@ data-on-set-time="onTimeSet" <-- **This will NOT work, the ()'s are required*
164
145
165
146
166
147
## Configuration Options
148
+ *** NOTE*** The configuration optionss are not attributes on the element but rather members of the configuration object,
149
+ which is specified in the data-datetimepicker-config attribute.
150
+
151
+ ``` html
152
+ <datetimepicker data-ng-model =" data.date" data-datetimepicker-config =" { dropdownSelector: '.dropdown-toggle' }" ></datetimepicker >
153
+ ```
167
154
168
155
### startView
169
156
@@ -262,11 +249,19 @@ In this example, the drop-down functionality is controlled by Twitter Bootstrap.
262
249
The <code >dropdownSelector</code > tells the datetimepicker which element is bound to the Twitter Bootstrap drop-down so
263
250
the drop-down is toggled closed after the user selectes a date/time.
264
251
265
- ## I18N
252
+
253
+ ## I18N / l10n support
266
254
267
255
All internationalization is handled by Moment.js, see Moment's documentation for details.
268
256
In most cases, all that is needed is a call to ``` moment.locale(String) ```
269
257
258
+ One exception is the title of the month view - moment does not (yet) have a localized format for month and year.
259
+
260
+ ``` JavaScript
261
+ moment .locale (' en' ); // English
262
+ moment .locale (' zh-cn' ); // Simplified chinese
263
+ ```
264
+
270
265
# Screenshots
271
266
272
267
## Year view
@@ -305,6 +300,9 @@ This view allows the user to select a specific time of day, in the selected hour
305
300
By default, the time is displayed in 5 minute increments. The <code >minuteStep</code > property controls the increments of time displayed.
306
301
If the minute view is the minView, which is is by default, the date will be set to the beginning of the hour on the day selected.
307
302
303
+ ##Contributing
304
+
305
+
308
306
## License
309
307
310
308
angular-bootstrap-datetimepicker is freely distributable under the terms of the [ MIT license] ( LICENSE ) .
0 commit comments