Skip to content

Adds onClear prop to EuiDatePicker to make it "clearable"#2235

Merged
jasonrhodes merged 3 commits intoelastic:masterfrom
jasonrhodes:clearable-date-picker
Aug 16, 2019
Merged

Adds onClear prop to EuiDatePicker to make it "clearable"#2235
jasonrhodes merged 3 commits intoelastic:masterfrom
jasonrhodes:clearable-date-picker

Conversation

@jasonrhodes
Copy link
Member

@jasonrhodes jasonrhodes commented Aug 16, 2019

Summary

Adds an optional onClose prop to the the EuiDatePicker component. When present, it's passed to the EuiFormControlLayout that already wraps the date picker component, as its onClick method, so that the standard EUI close icon is applied.

eui-clearable-date-picker

Checklist

  • Checked in dark mode
  • Checked in mobile
  • Checked in IE11 and Firefox
  • Props have proper autodocs
  • Added documentation examples
  • Added or updated jest tests
  • Checked for breaking changes and labeled appropriately
  • Checked for accessibility including keyboard-only and screenreader modes
  • A changelog entry exists and is marked appropriately

Co-Authored-By: Greg Thompson <thompsongl@users.noreply.github.com>
Copy link
Contributor

@thompsongl thompsongl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @jasonrhodes

Copy link
Contributor

@snide snide left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TY for adding to the docs. Checked for keyboard accessibility and reviewed the code. LGTM.

@jasonrhodes
Copy link
Member Author

TY for adding to the docs. Checked for keyboard accessibility and reviewed the code. LGTM.

EUI docs are some of the best around, I'll be damned if I'll be the one to screw that up. Thanks!!!

@jasonrhodes jasonrhodes merged commit d0d9684 into elastic:master Aug 16, 2019
@jasonrhodes jasonrhodes deleted the clearable-date-picker branch August 16, 2019 20:25
thompsongl added a commit to thompsongl/eui that referenced this pull request Sep 10, 2019
* Adds onClear prop to EuiDatePicker to make it "clearable"

* Adds changelog entry

* Update CHANGELOG.md

Co-Authored-By: Greg Thompson <thompsongl@users.noreply.github.com>
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.

3 participants