Skip to content

Latest commit

 

History

History
43 lines (31 loc) · 1.23 KB

README.md

File metadata and controls

43 lines (31 loc) · 1.23 KB

react-select-datepicker

A simple and reusable dropdown datepicker component for React (Demo)

NPM npm bundle size GitHub contributors npm NPM

Select Datepicker

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