UX: Use i18n for date picker

This commit is contained in:
Gerhard Schlager 2016-02-05 21:49:21 +01:00
parent 89add4a4a2
commit f7eb7f25bd
2 changed files with 10 additions and 0 deletions

View File

@ -17,6 +17,14 @@ export default Em.Component.extend({
format: "YYYY-MM-DD",
defaultDate: moment().add(1, "day").toDate(),
minDate: new Date(),
firstDay: moment.localeData().firstDayOfWeek(),
i18n: {
previousMonth: I18n.t('dates.previous_month'),
nextMonth: I18n.t('dates.next_month'),
months: moment.months(),
weekdays: moment.weekdays(),
weekdaysShort: moment.weekdaysShort()
},
onSelect: date => this.set("value", moment(date).format("YYYY-MM-DD"))
};

View File

@ -109,6 +109,8 @@ en:
x_years:
one: "1 year later"
other: "%{count} years later"
previous_month: 'Previous Month'
next_month: 'Next Month'
share:
topic: 'share a link to this topic'
post: 'post #%{postNumber}'