mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-23 01:06:35 +00:00
Use local timezone for log and history dates
This commit is contained in:
parent
c263545bda
commit
eb7dc87971
@ -1 +1 @@
|
||||
Subproject commit b7ac88af0bf5a6065c021e47dc6af0f7006b187b
|
||||
Subproject commit 3f29d9a833a4aeeda350119bffa778fe944faace
|
@ -36,7 +36,7 @@
|
||||
|
||||
<div class$="[[computeContentClasses(narrow)]]">
|
||||
<paper-input label='Showing entries for' id='datePicker'
|
||||
value='[[selectedDate]]'></paper-input>
|
||||
value='[[selectedDateStr]]'></paper-input>
|
||||
|
||||
<state-history-charts state-history="[[stateHistory]]"
|
||||
is-loading-data="[[isLoadingData]]"></state-history-charts>
|
||||
@ -94,6 +94,20 @@ Polymer({
|
||||
return hass.entityHistoryGetters.currentDate;
|
||||
},
|
||||
},
|
||||
|
||||
selectedDateStr: {
|
||||
type: String,
|
||||
value: null,
|
||||
bindNuclear: function (hass) {
|
||||
return [
|
||||
hass.entityHistoryGetters.currentDate,
|
||||
function (currentDate) {
|
||||
var dateObj = new Date(currentDate);
|
||||
return dateObj.toLocaleDateString();
|
||||
},
|
||||
];
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
isDataLoadedChanged: function (newVal) {
|
||||
|
@ -37,7 +37,7 @@
|
||||
<paper-input
|
||||
label='Showing entries for'
|
||||
id='datePicker'
|
||||
value='[[selectedDate]]'
|
||||
value='[[selectedDateStr]]'
|
||||
on-focus='datepickerFocus'
|
||||
></paper-input>
|
||||
|
||||
@ -77,6 +77,20 @@ Polymer({
|
||||
},
|
||||
},
|
||||
|
||||
selectedDateStr: {
|
||||
type: String,
|
||||
value: null,
|
||||
bindNuclear: function (hass) {
|
||||
return [
|
||||
hass.logbookGetters.currentDate,
|
||||
function (currentDate) {
|
||||
var dateObj = new Date(currentDate);
|
||||
return dateObj.toLocaleDateString();
|
||||
},
|
||||
];
|
||||
},
|
||||
},
|
||||
|
||||
isLoading: {
|
||||
type: Boolean,
|
||||
bindNuclear: function (hass) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user