@leviwork7/react-datepicker
v1.0.2
Published
react-datepicker
Downloads
3
Maintainers
Readme
Version
- node:
>= 14.x
- react:
17.0.2
Yarn install
$ yarn add @leviwork7/react-datepicker
import React, { useState } from "react";
import ReactDatePicker from '@leviwork7/react-datepicker';
import '@leviwork7/react-datepicker/dist/cjs/index.css';
const App = (props) => {
const [date, setDate] = useState('NO DATE')
return (
<div className='demo'>
<h3>已選擇的日期:{ date }</h3>
<ReactDatePicker
onSelect={(date) => {
console.log({ date })
setDate(date.label)
}}
/>
</div>
)
}
Demo startup
$ yarn
$ yarn demo