import React from 'react' ; import { CellProps , isDateControl , RankedTester , rankWith , WithClassname } from '@jsonforms/core' ; import { withJsonFormsCellProps } from '@jsonforms/react' ; import Input from '@mui/material/Input' ; import merge from 'lodash/merge' ; export const MaterialDateCell = ( props ) => { const { data , className , id , enabled , uischema , path , handleChange , config } = props ; const appliedUiSchemaOptions = merge ( { } , config , uischema . options ) ; return ( < Input type = 'date' value = { data || '' } onChange = { ev => handleChange ( path , ev . target . value ) } className = { className } id = { id } disabled = { ! enabled } autoFocus = { appliedUiSchemaOptions . focus } fullWidth = { true } / > ) ; } ; export const materialDateCellTester = rankWith ( 2 , isDateControl ) ; export default withJsonFormsCellProps ( MaterialDateCell ) ;