npm.io
7.1.3 • Published 5 months ago

@tabula/ui-date-picker

Licence
ISC
Version
7.1.3
Deps
5
Size
99 kB
Vulns
0
Weekly
0
Stars
1

@tabula/ui-date-picker

Allows to pick a date, time or date and time together.

Installation

Use the package manager pnpm to install @tabula/ui-date-picker.

pnpm add @tabula/ui-date-picker

You can use npm or yarn too.

Usage

We provide three types of picker:

  • date - only date picker is shown;
  • time - only time picker is shown;
  • datetime - both date and time picker are shown.

Import component and render it with required type:

import { FC, MouseEventHandler, PropsWithChildren } from 'react';

import { UiDatePicker } from '@tabula/ui-date-picker';

const Picker = () => {
  const [selected, setSelected] = useState<Date | null>(null);

  return <UiDatePicker onSelect={setSelected} selected={selected} type="date" />;
};

License

This project is ISC licensed.

Keywords