mirror of
https://github.com/discourse/discourse.git
synced 2025-01-19 04:42:55 +08:00
UX: Use i18n for date picker
This commit is contained in:
parent
89add4a4a2
commit
f7eb7f25bd
|
@ -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"))
|
||||
};
|
||||
|
||||
|
|
|
@ -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}'
|
||||
|
|
Loading…
Reference in New Issue
Block a user