-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
87542d7
commit 053cba2
Showing
3 changed files
with
154 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,152 @@ | ||
--- | ||
productId: x-date-pickers | ||
title: DX - Pickers | ||
title: DX - Picker | ||
--- | ||
|
||
# Fields | ||
# Picker | ||
|
||
<p class="description">This page describes how people can use picker with Material UI and how they can build custom pickers.</p> | ||
|
||
:::success | ||
This page extends the initial proposal made in [#14718](https://github.com/mui/mui-x/issues/14718) | ||
::: | ||
|
||
## With Material UI | ||
## Basic usage | ||
|
||
### Basic usage | ||
### With Material UI | ||
|
||
TODO | ||
|
||
### Override part of the UI | ||
### Without Material UI | ||
|
||
```tsx | ||
function CustomDatePicker(props) { | ||
const manager = useDateManager(); | ||
|
||
return ( | ||
<Popover.Root> | ||
<Picker.Root manager={manager} {...props}> | ||
<PickerField.Root> | ||
<PickerField.Root> | ||
{/** See field documentation */} | ||
<Popover.Trigger>📅</Popover.Trigger> | ||
</PickerField.Root> | ||
</PickerField.Root> | ||
<Popover.Backdrop /> | ||
<Popover.Positioner> | ||
<Popover.Popup> | ||
<Picker.Views></Picker.Views> | ||
</Popover.Popup> | ||
</Popover.Positioner> | ||
</Picker.Root> | ||
</Popover.Root> | ||
); | ||
} | ||
``` | ||
|
||
## Add an action bar | ||
|
||
### With Material UI | ||
|
||
TODO | ||
|
||
### Without Material UI | ||
|
||
```tsx | ||
<Picker.Layout> | ||
<Picker.Views>{/** See demo above */}</Picker.Views> | ||
<div> | ||
<Picker.Clear>Clear</Picker.Clear> | ||
<Popover.Close>Close</Popover.Close> | ||
</div> | ||
</Picker.Layout> | ||
``` | ||
|
||
## Add a toolbar | ||
|
||
### With Material UI | ||
|
||
TODO | ||
|
||
### Without Material UI | ||
|
||
```tsx | ||
<Picker.Layout> | ||
<Picker.Toolbar.Root> | ||
<Picker.Toolbar.Title /> | ||
</Picker.Toolbar.Root> | ||
<Picker.Views>{/** See demo above */}</Picker.Views> | ||
</Picker.Layout> | ||
``` | ||
|
||
```tsx | ||
<Picker.Layout> | ||
<Picker.Toolbar.Root> | ||
<Picker.SetView target="year"> | ||
<Picker.Toolbar.Title format="YYYY" /> | ||
</Picker.SetView> | ||
<Picker.SetView target="day"> | ||
<Picker.Toolbar.Title format="DD MMMM" /> | ||
</Picker.SetView> | ||
</Picker.Toolbar.Root> | ||
<Picker.Views>{/** See demo above */}</Picker.Views> | ||
</Picker.Layout> | ||
``` | ||
|
||
## Add tabs | ||
|
||
### With Material UI | ||
|
||
TODO | ||
|
||
### Without Material UI | ||
|
||
TODO | ||
|
||
## Without Material UI | ||
## Add shortcuts | ||
|
||
### With Material UI | ||
|
||
TODO | ||
|
||
### Without Material UI | ||
|
||
TODO | ||
|
||
## Anatomy of `Picker.*` | ||
|
||
### `Picker.Root` | ||
|
||
TODO | ||
|
||
### `Picker.Clear` | ||
|
||
TODO | ||
|
||
### `Picker.SetValue` | ||
|
||
TODO | ||
|
||
### `Picker.SetView` | ||
|
||
TODO | ||
|
||
### `Picker.Layout` | ||
|
||
TODO | ||
|
||
### `Picker.Toolbar.Root` | ||
|
||
TODO | ||
|
||
### `Picker.Toolbar.Title` | ||
|
||
TODO | ||
|
||
### `Picker.Shortcuts.Root` | ||
|
||
TODO | ||
|
||
### Basic usage | ||
### `Picker.Shortcut.Item` | ||
|
||
TODO |