-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Doesn't work with binding #129
Comments
I can reproduce this. My current workaround is using two properties (via wrapper component), one for outer change (called properties: {
date: {
type: String,
notify: true,
observer: '_onDateChanged'
},
value: {
type: String
}
},
_onDateChanged: function (date) {
// when date is set from <paper-input>, update datepicker
var input = Date.parse(date);
if (!isNaN(input)) {
// not a NaN means a valid date string
var upd = new Date(input);
// <paper-date-picker> resets hours, so we need to do the same
// https://github.com/bendavis78/paper-date-picker/issues/50
upd.setHours(0);
// only update value if it has changed
if (this.value !== upd) {
this.value = upd;
}
}
}, Not sure, but it's likely that @bendavis78 WDYT? |
I have the same problem and can't bind Strangely enough the example from README.md reads: So the binding is supposed to work. |
I'm not having this issue, but if you can recreate the problem using something like JSFiddle @diegocerdan I might be able to fix it for you. |
<paper-date-picker date="[[ date ]]"></paper-date-picker>
for example
date
is binding and the value is 2016-12-01it will give error:
repeated like ~1.000 times
The text was updated successfully, but these errors were encountered: