Fix language reference (#1735)

This commit is contained in:
Paulus Schoutsen 2018-10-04 13:24:07 +02:00 committed by GitHub
parent a76386b53b
commit 6720c03cbc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 6 deletions

View File

@ -158,9 +158,8 @@ class HaPanelHistory extends LocalizeMixin(PolymerElement) {
super.connectedCallback();
// We are unable to parse date because we use intl api to render date
this.$.picker.set('i18n.parseDate', null);
this.$.picker.set('i18n.formatDate', function (date) {
return formatDate(new Date(date.year, date.month, date.day), this.language);
});
this.$.picker.set('i18n.formatDate', date =>
formatDate(new Date(date.year, date.month, date.day), this.language));
}
_computeStartTime(_currentDate) {

View File

@ -134,9 +134,8 @@ class HaPanelLogbook extends LocalizeMixin(PolymerElement) {
super.connectedCallback();
// We are unable to parse date because we use intl api to render date
this.$.picker.set('i18n.parseDate', null);
this.$.picker.set('i18n.formatDate', function (date) {
return formatDate(new Date(date.year, date.month, date.day), this.language);
});
this.$.picker.set('i18n.formatDate', date =>
formatDate(new Date(date.year, date.month, date.day), this.language));
}
_computeFilterDate(_currentDate) {