1.2.1 • Published 2 years ago
react-mui-datepicker v1.2.1
React MUI Datepicker
The Date Picker component lets the user select a date and supported to Gregorian Calendar and Hijri(Umm Al-Qura) Calendar.
This package relay on MUI and moment hijri
How to use
You can now import DatePicker as a normal package installed from npm like so:
import {DatePicker} from 'react-mui-datepicker'
const App = () => <DatePicker />;
export default App;to switch between calendars
import {DatePicker} from 'react-mui-datepicker'
const App = () => <DatePicker isToggle />;
export default App;Available props
The React MUI Datepicker component accepts the following props:
| Prop | Type | Description |
|---|---|---|
| lang | ar or en (optional) | default: en |
| isError | boolean (optional) | |
| maxDate | Date (optional) | |
| minDate | Date (optional) | |
| disabled | boolean (optional) | |
| ref | React.Ref (optional) | |
| value | string (optional) | |
| onChange | (date: Moment or null) => void (optional) | |
| toggleText | string (optional) | |
| isToggle | boolean (optional) | |
| calendar | "gregrian" or "hijri" (optional) | default: gregrian |
| toggleClassName | string (optional) | |
| inputClassName | string (optional) |
License
react-mui-datepicker is available under the MIT license