Closed greypants closed 8 years ago
I mentioned this in a few other issues I'm kicking around. I think it would be nice if we expose a variety of callbacks for different events within Ca11y
and expose them as properties of options
.
What do you think about having an optional element
option which, when present, would directly attach Ca11y to the input. When omitted, the user would be responsible for:
1) providing an onDaySelected
callback that receives the selected date from Ca11y and renders it into the form input
2) adding a change
event listener to the input that, when fired, parses the input value and if it is a valid date, calls back to the Ca11y
instance and tells it to update it's internal state
Still thinking on this a bit.
For doing things like custom date parsing. We probably shouldn't even touch the date input... let the implementer do that in the callback. Ideally I'd like the setup to be something like: