File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
packages/react-renderer-demo/src/examples/components/conditions Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,9 @@ import DatePicker from '@data-driven-forms/mui-component-mapper/date-picker';
6
6
import PlainText from '@data-driven-forms/mui-component-mapper/plain-text' ;
7
7
import FormTemplate from '@data-driven-forms/mui-component-mapper/form-template' ;
8
8
9
+ import LocalizationProvider from '@mui/lab/LocalizationProvider' ;
10
+ import AdapterDateFns from '@mui/lab/AdapterDateFns' ;
11
+
9
12
const calculateAge = ( birthday ) => {
10
13
let ageDifMs = Date . now ( ) - birthday ;
11
14
let ageDate = new Date ( ageDifMs ) ;
@@ -36,6 +39,10 @@ const componentMapper = {
36
39
[ componentTypes . PLAIN_TEXT ] : PlainText ,
37
40
} ;
38
41
39
- const IsCondition = ( ) => < FormRenderer FormTemplate = { FormTemplate } componentMapper = { componentMapper } schema = { schema } onSubmit = { console . log } /> ;
42
+ const IsCondition = ( ) => (
43
+ < LocalizationProvider dateAdapter = { AdapterDateFns } >
44
+ < FormRenderer FormTemplate = { FormTemplate } componentMapper = { componentMapper } schema = { schema } onSubmit = { console . log } />
45
+ </ LocalizationProvider >
46
+ ) ;
40
47
41
48
export default IsCondition ;
You can’t perform that action at this time.
0 commit comments