Skip to content

Commit

Permalink
imrpove datepicker imports
Browse files Browse the repository at this point in the history
  • Loading branch information
Domino987 committed May 1, 2022
1 parent 151684a commit 8dea31c
Show file tree
Hide file tree
Showing 8 changed files with 2 additions and 65 deletions.
9 changes: 0 additions & 9 deletions babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,6 @@ module.exports = {
},
'@mui/material'
],
[
'import',
{
camel2DashComponentName: false,
libraryDirectory: '',
libraryName: '@mui/lab'
},
'@mui/lab'
],
[
'import',
{
Expand Down
48 changes: 0 additions & 48 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@
"@emotion/react": "^11.4.0",
"@emotion/styled": "^11.3.0",
"@mui/icons-material": ">=5.0.0",
"@mui/lab": ">=5.0.0-alpha.61",
"@mui/material": ">=5.0.0",
"@mui/x-date-pickers": "^5.0.0-alpha.2",
"classnames": "^2.2.6",
Expand Down
5 changes: 2 additions & 3 deletions src/components/MTableEditField/DateField.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import React from 'react';
import DateFnsUtils from '@date-io/date-fns';
import { AdapterDateFns } from '@mui/x-date-pickers/AdapterDateFns';
import { TextField } from '@mui/material';
import { LocalizationProvider, DatePicker } from '@mui/x-date-pickers';
import '@mui/lab';

function DateField({
columnDef,
Expand Down Expand Up @@ -33,7 +32,7 @@ function DateField({
const datePickerProps = getProps();

return (
<LocalizationProvider dateAdapter={DateFnsUtils} locale={locale}>
<LocalizationProvider dateAdapter={AdapterDateFns} locale={locale}>
<DatePicker
{...datePickerProps}
ref={forwardedRef}
Expand Down
1 change: 0 additions & 1 deletion src/components/MTableEditField/DateTimeField.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React from 'react';
import DateFnsUtils from '@date-io/date-fns';
import { LocalizationProvider, DateTimePicker } from '@mui/x-date-pickers';
import '@mui/lab';

function DateTimeField({ forwardedRef, ...props }) {
return (
Expand Down
1 change: 0 additions & 1 deletion src/components/MTableEditField/TimeField.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React from 'react';
import DateFnsUtils from '@date-io/date-fns';
import { LocalizationProvider, TimePicker } from '@mui/x-date-pickers';
import '@mui/lab';

function TimeField({ forwardedRef, ...props }) {
return (
Expand Down
1 change: 0 additions & 1 deletion src/components/MTableFilterRow/DateFilter.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import {
TimePicker,
LocalizationProvider
} from '@mui/x-date-pickers';
import '@mui/lab';

function DateFilter({
columnDef,
Expand Down
1 change: 0 additions & 1 deletion src/components/m-table-edit-field.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import {
DatePicker,
DateTimePicker
} from '@mui/x-date-pickers';
import '@mui/lab';
import PropTypes from 'prop-types';

class MTableEditField extends React.Component {
Expand Down

0 comments on commit 8dea31c

Please sign in to comment.