react-select-datepicker
v2.1.2
Published
A simple and reusable dropdown datepicker component for React
Downloads
4,277
Maintainers
Readme
react-select-datepicker
A simple and reusable dropdown datepicker component for React (Demo)
Install
npm install --save react-select-datepicker
Usage
import React, { useState, useCallback } from 'react';
import { SelectDatepicker } from 'react-select-datepicker';
export const App = () => {
const [value, setValue] = useState<Date | null>();
const onDateChange = useCallback((date: Date) => {
setValue(date);
}, []);
return (
<SelectDatepicker
selectedDate={value}
onDateChange={onDateChange}
/>
);
};
License
MIT © JMcAmmond