1.1.2 • Published 3 years ago

use-cal v1.1.2

Weekly downloads
5
License
MIT
Repository
github
Last release
3 years ago

useCalendar

NPM Publish Bundlephobia

Simple calendar logic for React.

Installation

npm i use-cal

useCalendar was designed to work with the date management library of your choice.

npm i @date-io/date-fns date-fns
// or
npm i @date-io/moment moment
// or
npm i @date-io/luxon luxon
// or
npm i @date-io/dayjs dayjs

Usage

import useCalendar from "use-cal";
import DateFnsAdapter from "@date-io/date-fns";
import locale from "date-fns/locale/en-GB";

const { date, month, weekdays, days, navigatePrev, navigateNext } = useCalendar<
  Date
>({
  dateUtils: new DateFnsAdapter({ locale }),
  // Optionally set the initial date value of the calendar. Defaults to today.
  defaultDate: new Date(),
});
1.1.2

3 years ago

1.1.0

3 years ago

1.0.0

3 years ago

0.0.10

3 years ago

0.0.11

3 years ago

0.1.0

3 years ago

0.2.0

3 years ago

0.0.9

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago