UNPKG

@aliretail/react-materials-components

Version:
36 lines (32 loc) 813 B
--- title: MonthDatePicker order: 82 --- ```jsx import React from 'react'; import ReactDOM from 'react-dom'; import { FormComponents } from '@aliretail/react-materials-components'; const { MonthDatePicker, SchemaForm, SchemaMarkupField: Field, createFormActions } = FormComponents; const App = () => { return ( <SchemaForm components={{ MonthDatePicker }} onChange={console.log} defaultValue={{ readOnly: '2019-09', }} > <Field x-component="MonthDatePicker" title="MonthDatePicker" name="MonthDatePicker" x-component-props={{ format: 'YYYY-MM', }} /> <Field readOnly x-component="MonthDatePicker" title="readOnly" name="readOnly" /> </SchemaForm> ); }; ReactDOM.render(<App />, mountNode); ```