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

fix(date): add callback to be called when component blurs and picker is closed #6955

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

mihai-albu-sage
Copy link
Contributor

@mihai-albu-sage mihai-albu-sage commented Sep 13, 2024

fixes: #6788

Proposed behaviour

Added two new callbacks to the Date component:

  • onPickerOpen which is called when the DatePicker is opened
  • onPickerClosed which is called when the DatePicker is closed

This two callbacks enhance the functionality of the Date component and offer more flexibility especially when we want to trigger a callback precisely when the DatePicker component is opened and/or closed.

Current behaviour

In certain situations , when we want to open a Dialog as a callback the current onBlur does not suffice since both the DatePicker and the Dialog will be opened at the same time when we Tab away from the Date component.

Checklist

  • Commits follow our style guide
  • Related issues linked in commit messages if required
  • Screenshots are included in the PR if useful
  • All themes are supported if required
  • Unit tests added or updated if required
  • Playwright automation tests added or updated if required
  • Storybook added or updated if required
  • Translations added or updated (including creating or amending translation keys table in storybook) if required
  • Typescript d.ts file added or updated if required
  • Related docs have been updated if required

QA

  • Tested in provided StackBlitz sandbox/Storybook
  • Add new Playwright test coverage if required
  • Carbon implementation matches Design System/designs
  • UI Tests GitHub check reviewed if required

Additional context

Testing instructions

…is closed

added onPickerOpen and onPickerClose callbacks to the Date component

fixes: #6788
@mihai-albu-sage mihai-albu-sage changed the title FE-6761 - work in progress fix(date): add callback to be called when component blurs and picker is closed Sep 23, 2024
@mihai-albu-sage mihai-albu-sage marked this pull request as ready for review September 23, 2024 07:10
@mihai-albu-sage mihai-albu-sage requested a review from a team as a code owner September 23, 2024 07:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

Date picker unexpectedly appears above dialog overlay
4 participants