What time plug-ins can be used in react and how to use them
过去多啦不再A梦2017-06-26 10:59:55
Just use antd, which can be introduced as needed.
The following is the official basic code
import { DatePicker } from 'antd';
const { MonthPicker, RangePicker } = DatePicker;
function onChange(date, dateString) {
console.log(date, dateString);
}
ReactDOM.render(
<p>
<DatePicker onChange={onChange} />
<br />
<MonthPicker onChange={onChange} placeholder="Select month" />
<br />
<RangePicker onChange={onChange} />
</p>
, mountNode);