material-ui-arabic-datepicker
Version:
React components, that implements material design date and time pickers for material-ui v1 including a customized Datepicker with arabic header, months and weekdays and English numbers, modfied implementation from materail-ui-pickers
25 lines (20 loc) • 530 B
JSX
import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
import MaskedInput from 'react-text-mask';
export default class Input extends PureComponent {
static propTypes = {
mask: PropTypes.any,
inputRef: PropTypes.func.isRequired,
}
static defaultProps = {
mask: undefined,
}
render() {
const { inputRef, ...props } = this.props;
return (
this.props.mask
? <MaskedInput {...props} ref={inputRef} />
: <input {...props} ref={inputRef} />
);
}
}