Skip to content

Commit

Permalink
feat: update datepicker import
Browse files Browse the repository at this point in the history
  • Loading branch information
Domino987 committed Apr 25, 2022
1 parent 3587484 commit 34214cd
Show file tree
Hide file tree
Showing 7 changed files with 73 additions and 11 deletions.
56 changes: 56 additions & 0 deletions package-lock.json

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

9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,17 +111,18 @@
"@emotion/core": "^11.0.0",
"@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",
"date-fns": "^2.16.1",
"debounce": "^1.2.0",
"fast-deep-equal": "^3.1.3",
"prop-types": "^15.7.2",
"react-beautiful-dnd": "^13.0.0",
"react-double-scrollbar": "0.0.15",
"uuid": "^8.3.2",
"@mui/icons-material": ">=5.0.0",
"@mui/lab": ">=5.0.0-alpha.61",
"@mui/material": ">=5.0.0"
"uuid": "^8.3.2"
},
"peerDependencies": {
"react": ">=17.0.0",
Expand Down
3 changes: 2 additions & 1 deletion src/components/MTableEditField/DateField.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import React from 'react';
import DateFnsUtils from '@date-io/date-fns';
import { TextField } from '@mui/material';
import { LocalizationProvider, DatePicker } from '@mui/lab';
import { LocalizationProvider, DatePicker } from '@mui/x-date-pickers';
import '@mui/lab';

function DateField({
columnDef,
Expand Down
3 changes: 2 additions & 1 deletion src/components/MTableEditField/DateTimeField.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from 'react';
import DateFnsUtils from '@date-io/date-fns';
import { LocalizationProvider, DateTimePicker } from '@mui/lab';
import { LocalizationProvider, DateTimePicker } from '@mui/x-date-pickers';
import '@mui/lab';

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

function TimeField({ forwardedRef, ...props }) {
return (
Expand Down
5 changes: 3 additions & 2 deletions src/components/MTableFilterRow/DateFilter.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import React from 'react';
import AdapterDateFns from '@mui/lab/AdapterDateFns';
import { AdapterDateFns } from '@mui/x-date-pickers/AdapterDateFns';
import TextField from '@mui/material/TextField';
import { getLocalizedFilterPlaceHolder } from './utils';
import {
DatePicker,
DateTimePicker,
TimePicker,
LocalizationProvider
} from '@mui/lab';
} from '@mui/x-date-pickers';
import '@mui/lab';

function DateFilter({
columnDef,
Expand Down
5 changes: 3 additions & 2 deletions src/components/m-table-edit-field.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@ import FormControl from '@mui/material/FormControl';
import FormHelperText from '@mui/material/FormHelperText';
import FormGroup from '@mui/material/FormGroup';
import FormControlLabel from '@mui/material/FormControlLabel';
import AdapterDateFns from '@mui/lab/AdapterDateFns';
import { AdapterDateFns } from '@mui/x-date-pickers/AdapterDateFns';
import {
LocalizationProvider,
TimePicker,
DatePicker,
DateTimePicker
} from '@mui/lab';
} from '@mui/x-date-pickers';
import '@mui/lab';
import PropTypes from 'prop-types';

class MTableEditField extends React.Component {
Expand Down

0 comments on commit 34214cd

Please sign in to comment.