-
Notifications
You must be signed in to change notification settings - Fork 842
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
Start date popover for date picker range starts at the calendar icon #3383
Conversation
Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually? |
jenkins test this |
Preview documentation changes for this PR: https://eui.elastic.co/pr_3383/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@winnllam, thanks for creating this PR.
The way you fixed this issue introduces a new issue. If we pass, for instance, iconType="cheer"
to the EuiDatePickerRange this is what happen. Two icons are displayed:
As you can see, just changing the startControl showIcon: true
enables the calendar icon.
But if you <EuiDatePickerRange iconType={false} />
it doesn't remove the icon:
And if you <EuiDatePickerRange iconType={true} />
two icons are displayed:
Hey @winnllam, jumping in here... This is a great, easy solution. The nice thing is that flex is still sizing the inputs correctly too. It actually looks much better, spacing-wise, than the previous solution. I pushed a commit to your fork directly. The logic was just a little off and I wanted to align the prop name with our typical icon prop naming convention The icon can also be removed entirely. The extra logic you added in EuiDatePickerRange for deciding which icon to display was duplicative of the EuiDatePicker handling it itself, so I deleted that bit and just passed down the show/don't show prop. Overall, great solution! Thanks so much. One more screenshot showing the actual popover: |
jenkins test this |
Preview documentation changes for this PR: https://eui.elastic.co/pr_3383/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Summary
Fixes #3374
Icon has been changed to be a part of the start date, so the picker aligns with the front,
Checklist
- [ ] Checked for accessibility including keyboard-only and screenreader modes