Skip to content

Commit

Permalink
DO NOT MERGE Reproducing mui#1776
Browse files Browse the repository at this point in the history
  • Loading branch information
Philipp91 committed May 22, 2020
1 parent 07afa11 commit f42bd3c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 21 deletions.
3 changes: 2 additions & 1 deletion docs/layout/PageWithContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { LocalizationProvider } from '@material-ui/pickers';
import { UtilsContext } from '../_shared/UtilsServiceContext';
import { NotificationManager } from 'utils/NotificationManager';
import { createUtilsService, UtilsLib, utilsMap } from '../utils/utilsService';
import DateFnsLocaleDe from 'date-fns/locale/de';
import {
Theme,
createMuiTheme,
Expand Down Expand Up @@ -105,7 +106,7 @@ export const PageWithContexts: React.SFC<Props> = ({
>
<ThemeProvider theme={muiTheme}>
<SnackbarProvider maxSnack={3}>
<LocalizationProvider dateAdapter={utilsMap[lib]}>
<LocalizationProvider dateAdapter={utilsMap[lib]} locale={DateFnsLocaleDe}>
<ThemeContext.Provider value={theme}>
<UtilsContext.Provider value={createUtilsService(lib)}>
<CssBaseline />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ function BasicDateTimePicker() {
label="DateTimePicker"
value={selectedDate}
onChange={handleDateChange}
mask="__.__.____ __:__"
/>
</Fragment>
);
Expand Down
20 changes: 0 additions & 20 deletions docs/pages/demo/datetime-picker/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,26 +24,6 @@ Allows choosing date then time. There are too many views, so tabs are required t

<Example source={BasicDateTimePicker} />

#### Responsiveness

DateTimePicker is a complex control, so you may consider using `MobileDateTimePicker` for desktop users as well.

<Example source={DateTimePickers} />

#### Date & Time validation

It is possible to restrict date and time selection in couple of different ways. If you need to restrict time selection
you could use `minDateTime` to restrict selecting date and time before particular moment of time.
Or you can use `minTime` to disable a part of time in each day.

<Example source={DateTimeValidation} />

#### Customization

Here are some examples of heavily customized date & time pickers

<Example source={CustomDateTimePicker} />

#### Components API

<LinkedComponents components={['DateTimePicker', 'KeyboardDateTimePicker']} />

0 comments on commit f42bd3c

Please sign in to comment.