Skip to content

Conversation

@oknemi
Copy link
Contributor

@oknemi oknemi commented Oct 16, 2017

This is intended to custom focus on input element by ref.

@coveralls
Copy link

coveralls commented Oct 16, 2017

Coverage Status

Coverage remained the same at 98.936% when pulling f09d799 on oknemi:add-ref into 4b085f4 on charliekassel:master.

@charliekassel
Copy link
Owner

Not sure why this is needed as a prop @oknemi?
ref can be added when adding the component to the DOM.

<datepicker ref="mypicker"/>

@oknemi
Copy link
Contributor Author

oknemi commented Oct 20, 2017

Hi, @charliekassel. I want to make it clear, that for me it is useful when calendar shows on focus. I hope #210 will be merged one day.

It can be useful when you need to focus on input. It doesn't work if I add ref attribute directly to the component, as you suggested. Because there's no focus function. So, in such case, I need to go throw all children elements and find input element.

@coveralls
Copy link

coveralls commented Nov 9, 2017

Coverage Status

Coverage remained the same at 99.02% when pulling a16a069 on oknemi:add-ref into 0db6f1e on charliekassel:master.

@charliekassel charliekassel merged commit 54ddbf9 into charliekassel:master Nov 14, 2017
@Eduruiz
Copy link

Eduruiz commented Aug 9, 2018

@oknemi did you manage to make datepicker open on focus? If so, can you explain how? I'm struggling with this task.

@oknemi
Copy link
Contributor Author

oknemi commented Aug 13, 2018

@Eduruiz I made separate input and datepicker with inline="true". Then I made my custom wrapper for input and datepicker calendar, like dropdown. So then you can open(toggle) your dropdown with calendar by event on your custom input.

@Eduruiz
Copy link

Eduruiz commented Aug 13, 2018

@oknemi thanks!! I'll try it next time I run into this. For this project, I have been forced to change my datepicker component. "/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants