Skip to content

Commit ec2d948

Browse files
committed
Sort options alphabetically
1 parent 7116261 commit ec2d948

File tree

2 files changed

+16
-13
lines changed

2 files changed

+16
-13
lines changed

README.md

+14-11
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,20 @@ See [momentjs'](http://momentjs.com/docs/#/displaying/format/) docs for valid fo
7878

7979

8080

81+
#### locale
82+
83+
Default: `moment.locale()`
84+
85+
Accepts: `string`, `moment.local('locale')`
86+
87+
```handlebars
88+
{{bs-datetimepicker date=myDate locale='de'}}
89+
```
90+
91+
Use the specified locale for text rendering
92+
93+
94+
8195
#### maxDate
8296

8397
Default: `false`
@@ -165,17 +179,6 @@ The default view to display when the picker is shown.
165179
*Note:* To limit the picker to selecting, for instance the year and month, use format: `MM/YYYY`
166180

167181

168-
#### locale
169-
170-
Default: `moment.locale()`
171-
172-
Accepts: `string`, `moment.local('locale')`
173-
174-
```handlebars
175-
{{bs-datetimepicker date=myDate locale="de"}}
176-
```
177-
178-
Use the specified locale for text rendering
179182

180183
## License
181184

addon/components/bs-datetimepicker.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ export default Ember.Component.extend({
1313
date: this.getWithDefault('date', defaults.defaultDate),
1414
focusOnShow: this.getWithDefault('focusOnShow', defaults.focusOnShow),
1515
format: this.getWithDefault('format', defaults.format),
16+
locale: this.getWithDefault('locale', defaults.locale),
1617
maxDate: this.getWithDefault('maxDate', defaults.maxDate),
1718
minDate: this.getWithDefault('minDate', defaults.minDate),
1819
showClear: this.getWithDefault('showClear', defaults.showClear),
1920
showClose: this.getWithDefault('showClose', defaults.showClose),
2021
showTodayButton: this.getWithDefault('showTodayButton', defaults.showTodayButton),
21-
viewMode: this.getWithDefault('viewMode', defaults.viewMode),
22-
locale: this.getWithDefault('locale', defaults.locale),
22+
viewMode: this.getWithDefault('viewMode', defaults.viewMode)
2323
}).on('dp.change', e => {
2424
// Convert moment to js date or default to null
2525
let newDate = e.date && e.date.toDate() || null;

0 commit comments

Comments
 (0)