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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

DateRangePicker -> Custom input component demo slightly broken #2027

Closed
2 tasks done
Chee7ah opened this issue Jul 23, 2020 · 3 comments
Closed
2 tasks done

DateRangePicker -> Custom input component demo slightly broken #2027

Chee7ah opened this issue Jul 23, 2020 · 3 comments

Comments

@Chee7ah
Copy link
Contributor

Chee7ah commented Jul 23, 2020

  • The issue is present in the latest release.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 馃槸

DateRangePicker closes immediately after the first date has been picked.
Happens in alpha.9 and alpha.10.

G51d4zo4g4

Expected Behavior 馃

DateRangePicker stays open till both ends of the range have been picked.
Works as expected in alpha.8.

uEhDmjuF5S

Steps to Reproduce 馃暪

Steps:

  1. Go to https://v4-0-0-alpha-10.material-ui-pickers.dev/demo/daterangepicker#custom-input-component
  2. Fill in a date range with the picker
  3. Note that picker closes immediately after first date is picked
  4. Have to blur and refocus second input field to be able to fill the second date

Context 馃敠

Live example on the demo page

Your Environment 馃寧

The demo page

@Chee7ah Chee7ah added the status: needs triage These issues haven't been looked at yet by a maintainer. label Jul 23, 2020
@dmtrKovalenko
Copy link
Member

Thanks for raising. There issue is related to usage of startProps.ref instead of startProps.inputRef.

Can you check that it works for you? And if you have time -- PR with a fix of example will be appreciated 鉂わ笍

@Chee7ah
Copy link
Contributor Author

Chee7ah commented Jul 23, 2020

Checked, it fixes it. Opened PR #2028 with the change.

@oliviertassinari oliviertassinari added component: DateRangePicker docs and removed status: needs triage These issues haven't been looked at yet by a maintainer. labels Jul 23, 2020
dmtrKovalenko added a commit that referenced this issue Jul 27, 2020
* Update `ref` to `inputRef` on the broken demo

Fixes Issue #2027

* yarn prettier

Co-authored-by: Dmitriy Kovalenko <dmtr.kovalenko@outlook.com>
@oliviertassinari
Copy link
Member

Thanks for working on it, I think that we can close the issue once we have taken care of #2028 (comment).

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

No branches or pull requests

3 participants