Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve doc
Browse files Browse the repository at this point in the history
flaviendelangle committed Sep 17, 2024

Verified

This commit was signed with the committer’s verified signature.
pradyunsg Pradyun Gedam
1 parent cb32485 commit 26a8775
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions docs/data/date-pickers/custom-field/custom-field.md
Original file line number Diff line number Diff line change
@@ -151,21 +151,26 @@ Learn more about the accessible DOM structure and its difference compared to the

## Usage with another UI

### Using a read-only `TextField`

{{"demo": "custom-behavior/ReadonlyMaterialTextField.js", "defaultCodeOpen": false}}

### Using an `Autocomplete`

If your user can only select a value in a small list of available dates,
you can replace the field with an `Autocomplete` listing those dates:

{{"demo": "PickerWithAutocompleteField.js", "defaultCodeOpen": false}}

### Using a read-only `TextField`

If you only want to allow the user to pick a value through the views,
but you still want the UI to look like a `TextField`, you can replace the field with a read-only `TextField`:

{{"demo": "ReadonlyMaterialTextField.js", "defaultCodeOpen": false}}

{{"demo": "custom-behavior/ReadonlyMaterialTextField.js", "defaultCodeOpen": false}}

### Using a `Button`

If you only want to allow the user to pick a value through the views,
you can replace the field with a `Button`:
and you don't want the UI to look like a `TextField`, you can replace the field with a `Button`:

{{"demo": "PickerWithButtonField.js", "defaultCodeOpen": false}}

0 comments on commit 26a8775

Please sign in to comment.