Skip to content
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

Auto-focusing startDate #138

Closed
ilya-lopukhin opened this issue Oct 20, 2016 · 5 comments
Closed

Auto-focusing startDate #138

ilya-lopukhin opened this issue Oct 20, 2016 · 5 comments

Comments

@ilya-lopukhin
Copy link

ilya-lopukhin commented Oct 20, 2016

I don't know why this is happening, but startDate input always gets autofocused when i mount DateRangePicker. This is really annoying, i see onFocusChange(START_DATE) firing when i open dialog box containing DateRangePicker. Default focusedInput value is guaranteed null.

@ilya-lopukhin
Copy link
Author

Right now i'm dealing with it by supressing that first onFocusChange(START_DATE) thing manually.

@majapw
Copy link
Collaborator

majapw commented Oct 21, 2016

That's really bizarre and might be related to #120. Can you share your set-up?

@l3wi
Copy link

l3wi commented Nov 22, 2016

@architektor I'm facing the same issue. Could you please share your code for this.

@ilya-lopukhin
Copy link
Author

ilya-lopukhin commented Nov 23, 2016

@l3wi sure

handleDatePickerClose = () => {
    // temp fix to react-dates auto-opening
    // https://github.com/airbnb/react-dates/issues/138
    const inlineDialog = document.getElementById('date-picker');
    inlineDialog.open = false;

    this.props.unsetFocusedInput();
  }

@majapw
Copy link
Collaborator

majapw commented Dec 19, 2016

Hi @architektor, can you check if v4.1.1 fixed this issue?

The relevant PR is here - #212

@majapw majapw closed this as completed Jun 14, 2017
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

No branches or pull requests

3 participants