mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-16 22:06:34 +00:00
History and Logbook panel fixes
This commit is contained in:
parent
1203312ac3
commit
0a0a24e5eb
@ -35,8 +35,12 @@
|
|||||||
on-tap="handleRefreshClick"></paper-icon-button>
|
on-tap="handleRefreshClick"></paper-icon-button>
|
||||||
|
|
||||||
<div class$="[[computeContentClasses(narrow)]]">
|
<div class$="[[computeContentClasses(narrow)]]">
|
||||||
<paper-input label='Showing entries for' id='datePicker'
|
<paper-input
|
||||||
value='[[selectedDateStr]]'></paper-input>
|
label='Showing entries for'
|
||||||
|
id='datePicker'
|
||||||
|
value='[[selectedDateStr]]'
|
||||||
|
on-focus='datepickerFocus'
|
||||||
|
></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>
|
||||||
@ -128,9 +132,12 @@ Polymer({
|
|||||||
|
|
||||||
attached: function () {
|
attached: function () {
|
||||||
this.datePicker = new window.Pikaday({
|
this.datePicker = new window.Pikaday({
|
||||||
field: this.$.datePicker.inputElement,
|
field: document.createElement("input"),
|
||||||
|
trigger: this.$.datePicker.inputElement,
|
||||||
onSelect: this.hass.entityHistoryActions.changeCurrentDate,
|
onSelect: this.hass.entityHistoryActions.changeCurrentDate,
|
||||||
});
|
});
|
||||||
|
// Set the initial datePicker date, without triggering onSelect handler.
|
||||||
|
this.datePicker.setDate(this.selectedDate, true);
|
||||||
},
|
},
|
||||||
|
|
||||||
detached: function () {
|
detached: function () {
|
||||||
|
@ -139,9 +139,12 @@ Polymer({
|
|||||||
|
|
||||||
attached: function () {
|
attached: function () {
|
||||||
this.datePicker = new window.Pikaday({
|
this.datePicker = new window.Pikaday({
|
||||||
field: this.$.datePicker.inputElement,
|
field: document.createElement("input"),
|
||||||
|
trigger: this.$.datePicker.inputElement,
|
||||||
onSelect: this.hass.logbookActions.changeCurrentDate,
|
onSelect: this.hass.logbookActions.changeCurrentDate,
|
||||||
});
|
});
|
||||||
|
// Set the initial datePicker date, without triggering onSelect handler.
|
||||||
|
this.datePicker.setDate(this.selectedDate, true);
|
||||||
},
|
},
|
||||||
|
|
||||||
detached: function () {
|
detached: function () {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user