Datepicker library based for Reactjs
React | React Scripts | Bear React Grid |
---|---|---|
18 | 5.0.1 | 2.0.0 |
17 | 4.0.3 | 1.0.12 |
yarn add bear-react-datepicker
add in your index.tsx
import "bear-react-datepicker/dist/index.css";
then in your page
import {Datepicker, Timepicker, DateTimepicker} from 'bear-react-datepicker';
const BaseUsed = () => {
return (
<div>
<Datepicker value={myDate} onChange={setMyDate} isVisibleSetToday locale="zh-CN"/>
<Timepicker value={myTime} onChange={setMyTime} onClickOk={() => {}}/>
<DateTimepicker value={myDateTime} onChange={setMyDateTime} />
</div>
);
};
There is also a codesandbox template that you can fork and play with it:
MIT © imagine10255