Skip to content

Commit

Permalink
[docs] Add FAQ page (#11271)
Browse files Browse the repository at this point in the history
Signed-off-by: Nora <[email protected]>
Co-authored-by: José Rodolfo Freitas <[email protected]>
Co-authored-by: Lukas <[email protected]>
  • Loading branch information
3 people authored Dec 7, 2023
1 parent 029d4c1 commit e723473
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 0 deletions.
32 changes: 32 additions & 0 deletions docs/data/date-pickers/faq/faq.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
productId: x-date-pickers
title: Frequently Asked Questions - Date and Time pickers
githubLabel: 'component: pickers'
packageName: '@mui/x-date-pickers'
---

# Frequently asked questions

<p class="description">Can't find what you are looking for? The FAQ section has answers to some of the most frequent questions and challenges.</p>

If you still have trouble, you can refer to the [support page](/x/introduction/support/).

## What is the DemoContainer and DemoItem?

The `<DemoContainer />` is an internal component used together with the `<DemoItem />` to display multiple components in a consistent layout throughout the demos.

This helps avoid the repeated use of layout components, such as `<Box />` or `<Stack />`, while keeping the code minimal and clear, and allowing readers to focus on what is important - the demo itself.

:::warn
You should never use these components in your application.
:::

## Why is the KeyboardDatePicker not supported anymore?

It has been replaced with the `DatePicker` component, please refer to the [migration documentation](/material-ui/guides/pickers-migration/#imports) for more information.

All versions of the date and time pickers implement keyboard input for accessibility and also allow editing through the UI. Depending on your use case, you may only need keyboard editing, in which case you can use the date and time field components.

For instance, `DatePicker` allows for editing both via input and a calendar, while `DateField` only allows for editing via input. You can read more about the different types of components on the [base concepts page](/x/react-date-pickers/base-concepts/#other-components).

For more information about the fields, you can refer to the [field components page](/x/react-date-pickers/fields/).
1 change: 1 addition & 0 deletions docs/data/pages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ const pages: MuiPage[] = [
{ pathname: '/x/react-date-pickers', title: 'Overview' },
{ pathname: '/x/react-date-pickers/getting-started' },
{ pathname: '/x/react-date-pickers/base-concepts' },
{ pathname: '/x/react-date-pickers/faq', title: 'FAQ' },
{
pathname: '/x/react-date-pickers-components',
subheader: 'Components',
Expand Down
7 changes: 7 additions & 0 deletions docs/pages/x/react-date-pickers/faq.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import * as React from 'react';
import MarkdownDocs from 'docs/src/modules/components/MarkdownDocs';
import * as pageProps from 'docsx/data/date-pickers/faq/faq.md?@mui/markdown';

export default function Page() {
return <MarkdownDocs {...pageProps} />;
}

0 comments on commit e723473

Please sign in to comment.