Use local timezone for log and history dates
This commit is contained in:
+1
-1
Submodule home-assistant-js updated: b7ac88af0b...3f29d9a833
@@ -36,7 +36,7 @@
|
|||||||
|
|
||||||
<div class$="[[computeContentClasses(narrow)]]">
|
<div class$="[[computeContentClasses(narrow)]]">
|
||||||
<paper-input label='Showing entries for' id='datePicker'
|
<paper-input label='Showing entries for' id='datePicker'
|
||||||
value='[[selectedDate]]'></paper-input>
|
value='[[selectedDateStr]]'></paper-input>
|
||||||
|
|
||||||
<state-history-charts state-history="[[stateHistory]]"
|
<state-history-charts state-history="[[stateHistory]]"
|
||||||
is-loading-data="[[isLoadingData]]"></state-history-charts>
|
is-loading-data="[[isLoadingData]]"></state-history-charts>
|
||||||
@@ -94,6 +94,20 @@ Polymer({
|
|||||||
return hass.entityHistoryGetters.currentDate;
|
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) {
|
isDataLoadedChanged: function (newVal) {
|
||||||
|
|||||||
@@ -37,7 +37,7 @@
|
|||||||
<paper-input
|
<paper-input
|
||||||
label='Showing entries for'
|
label='Showing entries for'
|
||||||
id='datePicker'
|
id='datePicker'
|
||||||
value='[[selectedDate]]'
|
value='[[selectedDateStr]]'
|
||||||
on-focus='datepickerFocus'
|
on-focus='datepickerFocus'
|
||||||
></paper-input>
|
></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: {
|
isLoading: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
bindNuclear: function (hass) {
|
bindNuclear: function (hass) {
|
||||||
|
|||||||
Reference in New Issue
Block a user