djhi / meteor-autoform-materialize

DEPRECATED - Meteor AutoForm Materialize templates
https://atmospherejs.com/mozfet/autoform-materialize
MIT License
47 stars 29 forks source link

pickadate value getting removed on first submit if there is other valdiation error #84

Closed serkandurusoy closed 8 years ago

serkandurusoy commented 8 years ago

This also reproducible on the demo playground.

  1. Fill in the form, including the pickadate field, but leave some other mandatory field empty
  2. Submit the form
  3. See that the pickadate field is cleared, and required message is shown
  4. Repeat (don't refresh the page), now you see that the value is persisted across invalid submits
serkandurusoy commented 8 years ago

@djhi @Chun-Yang

removing the else block in https://github.com/djhi/meteor-autoform-materialize/blob/master/inputTypes/pickadate/pickadate.js#L91-L93 mitigates the issue.

I frankly don't get why that is there anyway. I've also checked other datepicker style autoform components, and it seems no one cares about such "clearing".