-
-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set focus to Datetimepicker programmatically #80
Comments
Hmm, that's a good one! I tried to continue your way of thinking and used Maybe we should add |
Exactly. I do not really want to rely on undocumented features. But if I could choose I would still like the solution for having the freedom to move the focus to the Datepicker by myself. One scenario that I have in my mind:
|
Hmmm, still I think autoFocus will be worth implementing since it's perfectly applicable. Related: |
👍 Cool! |
Out in |
Couldn't you give the option of passing in an onFocus property, then in your internal code on when you capture the onFocus event, check |
I think you're describing a different problem @BobbyWalker. onFocus would allow people to do things when the user manually focuses the field, and this thread is about allowing autoFocus property to be passed correctly to first input. |
Is there a way to set the focus to the Datetimepicker programmatically?
I tried to get the
ref
of the Datetimepicker wrapper and call focus on that one. But it's not enough. I think I would need to set the focus to the first input element. But I do not have theref
of that.E.g. having a prop
firstInputRef
for getting theref
to be able to callfocus()
would be already helpful.The text was updated successfully, but these errors were encountered: