Closed raulmt closed 11 months ago
Yeah, it's really usefull feature. Any chance it will be added soon?
Very useful, thanks a lot! I hope this will be accepted soon.
hi @raulmt . First of all, thank for your pr about this. l totally agree with you. We need to be carefully considered in the design of component properties. l add showFooter
property to control buttons visibility intuitively.
it was already published on version 4.0.2.
In some cases it's a lot better to have a date picker that actually sets the underlying form data just as you scroll the wheels, without needing to actually press a "confirm" button. This is how the iOS date picker works in many cases (example: go to the iOS Contacts app and add a birthday to some contact). Maybe because of this, we were having many users having trouble using this picker in a mobile, because they don't tap "confirm" button, they just try to go to another field or things like that.
This is why I added two main changes in this PR:
onChange
callback, that will get called on every picker selectioncancelText
prop (currently, passing null renders the button, just without text, which is maybe the worst option since its not useful)With those two things I was able to customize the picker in a way that supports not needing to press the confirm button (passing a handler for the
onChange
new callback, andnull
ascancelText
since it doesn't make sense to have a cancel button in this case).I'm already using this PR from my fork, but it would be great if this can be landed on the library. Please consider this, or let me know any feedback you have, or missing piece on this PR.
Thanks!