From b3efdd9efa95822bebd2e2766c19f276ada3042f Mon Sep 17 00:00:00 2001 From: Adam Mills Date: Wed, 27 Jul 2016 14:27:27 -0400 Subject: [PATCH] Additional comments for pikaday field binding --- panels/history/ha-panel-history.html | 2 ++ panels/logbook/ha-panel-logbook.html | 2 ++ 2 files changed, 4 insertions(+) diff --git a/panels/history/ha-panel-history.html b/panels/history/ha-panel-history.html index ac911f6185..60e800dccd 100644 --- a/panels/history/ha-panel-history.html +++ b/panels/history/ha-panel-history.html @@ -132,6 +132,8 @@ Polymer({ attached: function () { this.datePicker = new window.Pikaday({ + // Bind field to dummy input to prevent pikaday from overwriting + // field value with its internal formatting. field: document.createElement('input'), trigger: this.$.datePicker.inputElement, onSelect: this.hass.entityHistoryActions.changeCurrentDate, diff --git a/panels/logbook/ha-panel-logbook.html b/panels/logbook/ha-panel-logbook.html index 629a05e4ea..f3a8279c5b 100644 --- a/panels/logbook/ha-panel-logbook.html +++ b/panels/logbook/ha-panel-logbook.html @@ -139,6 +139,8 @@ Polymer({ attached: function () { this.datePicker = new window.Pikaday({ + // Bind field to dummy input to prevent pikaday from overwriting + // field value with its internal formatting. field: document.createElement('input'), trigger: this.$.datePicker.inputElement, onSelect: this.hass.logbookActions.changeCurrentDate,