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

chore(Field.Date): add docs example on how to enable auto close #4287

Merged
merged 3 commits into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -90,3 +90,11 @@ export const Range = () => {
</ComponentBox>
)
}

export const AutoClose = () => {
return (
<ComponentBox>
<Field.Date label="Automatically Close" showCancelButton={false} />
</ComponentBox>
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ import * as Examples from './Examples'

<Examples.Range />

### Automatically close picker

The calendar will be prevented from automatically closing when the submit or cancel buttons are visible, to ensure that the user is actually able to interact with them after date selection.

To enable the picker to close automatically, you have to set `showCancelButton` to `false`, to override the default behaviour.

<Examples.AutoClose />

### With help

<Examples.WithHelp />
Expand Down
Loading