@wjkang/react-ui-date-picker
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

React Simple Multi-Date Picker

A simple date picker React component

Image

Available Props

Props Type Default
onChange (selectedDate: Date[]) => void -
width string '100%'
singleSelect boolean false
headerFormat string 'MMM, Y'
selectedBackgroundColor string 'rgb(168,85,247)'
selectedTextColor string 'rgb(255, 255, 255)'
textColor string 'rgb(51, 51, 51)'
disableResetButton boolean false
disableTodayButton boolean false
allowPastSelect boolean false

Installation

npm install @wjkang/react-ui-date-picker date-fns

Example

Allow access to selected values by onChange callback

import { useState } from 'react';
import { DatePicker } from '@wjkang/react-ui-date-picker';

export default function CallbackExample() {
  const [selectedDate, setSelectedDate] = useState<Date[]>([]);

  return <DatePicker onChange={setSelectedDate} />;
}

Package Sidebar

Install

npm i @wjkang/react-ui-date-picker

Weekly Downloads

0

Version

1.1.0

License

MIT

Unpacked Size

123 kB

Total Files

17

Last publish

Collaborators

  • wjkang