unicef-polymer / etools-datepicker

Apache License 2.0
1 stars 1 forks source link

Prevent initial value optionally #3

Closed itsjustbrian closed 7 years ago

itsjustbrian commented 7 years ago

The datepicker defaults to the current date. Which is handy for selection, but not if trying avoid an initial value in the input. Trying to adjust for this outside the element is very difficult because this value is set very late into the element lifecycle, so any adjustments are overwritten, and it becomes indistinguishable from actual input. I'm thinking there needs to be an optional flag for no initial value (with the catch being the actual datepicker window should still start on the current date, but not output this value to it's properties).

DonNicoJs commented 7 years ago

Recently Adrian added a no-init attribute. Just drop it in and it will not auto initialize

adi130987 commented 7 years ago

@fafcrumb ... it seems that I forgot to add this no-init flag in the documentation. I will do it now.

adi130987 commented 7 years ago

@fafcrumb I documented noInit flag here #4

itsjustbrian commented 7 years ago

@lordfuoco @adi130987 thanks guys, working perfectly now. Closing this