Additional comments for pikaday field binding

This commit is contained in:
Adam Mills 2016-07-27 14:27:27 -04:00
parent 1a8832099c
commit b3efdd9efa
2 changed files with 4 additions and 0 deletions

View File

@ -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,

View File

@ -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,