djhi/meteor-autoform-materialize

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

serkandurusoy opened this issue · 1 comments

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

@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".