@material-ui/pickers#LocalizationProvider TypeScript Examples
The following examples show how to use
@material-ui/pickers#LocalizationProvider.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SQFormDatePicker.stories.test.tsx From SQForm with MIT License | 6 votes |
renderDatePicker = (
props?: Partial<
Omit<SQFormDatePickerProps, 'label' | 'name'> & {
sqFormProps?: FormProps | undefined;
schema: AnyObjectSchema;
}
>
) => {
render(
<LocalizationProvider dateAdapter={MomentAdapter} locale={'en'}>
<BasicDatePicker {...props} />
</LocalizationProvider>
);
}
Example #2
Source File: SQFormDatePickerWithDateFNS.stories.test.tsx From SQForm with MIT License | 6 votes |
renderDatePicker = (
props?: Partial<
Omit<SQFormDatePickerDateFNSProps, 'label' | 'name'> & {
sqFormProps?: FormProps | undefined;
schema: AnyObjectSchema;
}
>
) => {
render(
<LocalizationProvider dateAdapter={dateFnsAdapter} locale={enLocale}>
<BasicDatePicker {...props} />
</LocalizationProvider>
);
}
Example #3
Source File: preview.tsx From SQForm with MIT License | 5 votes |
withTheme = (storyFn: () => ThemeProviderProps['children']) => {
return (
<StylesProvider injectFirst>
<LocalizationProvider dateAdapter={MomentAdapter} locale={'en'}>
<MuiThemeProvider theme={muiTheme}>{storyFn()}</MuiThemeProvider>
</LocalizationProvider>
</StylesProvider>
);
}