You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
this.myDateOrMomentValue would always be a date/moment object, pikaday automagically handle the display formatting for us, and since the this.value is actually set via data down, the ember-paper validations should work out of the box.
ember-pikaday pikaday mixin already uses the didUpdateAttrs hook to update pikaday with newly passed down value, so we shouldn't be worried about having the underlaying input in sync with this.value, it would be handled by pikaday via this
Having date objects is compilant with ember-data date transform which should solve the ISO serializing automatically for us, I actually extended the transform to support moment, because we are using it
This simple override would let pikaday receive moment objects
Related issues: #6 #10
I think ember-pikaday already handles display for us, we shouldn't be managing setting the underlaying input value.
this function tries to reconcile
this.value
with the actual html5 input, but this is already handled by pikaday.My proposal would be to pass down date objects, and let pikaday handle the formatting
this.myDateOrMomentValue
would always be a date/moment object, pikaday automagically handle the display formatting for us, and since thethis.value
is actually set via data down, the ember-paper validations should work out of the box.ember-pikaday pikaday mixin already uses the didUpdateAttrs hook to update pikaday with newly passed down value, so we shouldn't be worried about having the underlaying input in sync with this.value, it would be handled by pikaday via this
Having date objects is compilant with ember-data
date
transform which should solve the ISO serializing automatically for us, I actually extended the transform to support moment, because we are using itThis simple override would let pikaday receive moment objects
The text was updated successfully, but these errors were encountered: