npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@finofo/datepicker

v3.1.0

Published

A simple react datepicker build with chakra-ui and date-fns

Readme

@finofo/datepicker

A React datepicker component built on Chakra UI with pluggable date adapters (dayjs or date-fns). Forked from hiwllc/datepicker.

Requirements

Installation

pnpm add @finofo/datepicker
# or
npm install @finofo/datepicker

Make sure peer dependencies are installed:

pnpm add @chakra-ui/react @emotion/react @emotion/styled framer-motion react react-dom dayjs

If you plan to use the date-fns adapter instead, also install date-fns@^2.

Usage

Wrap your app with CalendarAdapterProvider and pass a date adapter. Then compose the calendar using the compound component API.

import { ChakraProvider, extendTheme } from '@chakra-ui/react'
import {
  Calendar,
  CalendarAdapterProvider,
  AdapterDayjs,
  CalendarDefaultTheme,
  CalendarControls,
  CalendarPrevButton,
  CalendarNextButton,
  CalendarMonths,
  CalendarMonth,
  CalendarMonthName,
  CalendarWeek,
  CalendarDays,
} from '@finofo/datepicker'
import { useState } from 'react'

const theme = extendTheme(CalendarDefaultTheme)

export function App() {
  const [dates, setDates] = useState()

  return (
    <ChakraProvider theme={theme}>
      <CalendarAdapterProvider adapter={AdapterDayjs}>
        <Calendar value={dates} onSelectDate={setDates}>
          <CalendarControls>
            <CalendarPrevButton />
            <CalendarNextButton />
          </CalendarControls>

          <CalendarMonths>
            <CalendarMonth>
              <CalendarMonthName />
              <CalendarWeek />
              <CalendarDays />
            </CalendarMonth>
          </CalendarMonths>
        </Calendar>
      </CalendarAdapterProvider>
    </ChakraProvider>
  )
}

The example above renders the calendar directly. For usage with an input + popover, see the stories in stories/calendar.stories.tsx.

Using the date-fns adapter

If you prefer date-fns over dayjs:

import { AdapterDateFns } from '@finofo/datepicker/adapters/AdapterDateFns'

<CalendarAdapterProvider adapter={AdapterDateFns}>
  {/* ... */}
</CalendarAdapterProvider>

Import paths

The recommended import is from the package root:

import { Calendar, AdapterDayjs, CalendarDefaultTheme } from '@finofo/datepicker'

A legacy subpath is also supported for backward compatibility:

import { AdapterDayjs } from '@finofo/datepicker/dist/adapters/AdapterDayjs'

Customizing

Customize the calendar using Chakra UI's extendTheme. Override the component keys listed below.

import { extendTheme } from '@chakra-ui/react'
import { CalendarDefaultTheme } from '@finofo/datepicker'

export const theme = extendTheme(CalendarDefaultTheme, {
  components: {
    Calendar: {
      parts: ['calendar'],
      baseStyle: {
        calendar: {
          borderWidth: '6px',
          borderColor: 'pink.400',
          rounded: 'none',
          shadow: 'none',
        },
      },
    },

    CalendarControl: {
      parts: ['button'],
      baseStyle: {
        button: {
          h: 6,
          px: 2,
          rounded: 'none',
          fontSize: 'sm',
          color: 'white',
          bgColor: 'pink.400',
          _hover: { bgColor: 'pink.200' },
          _focus: { outline: 'none' },
        },
      },
    },
  },
})

Theme component keys

| Key name | Description | Parts | |-----------------|--------------------------------------------------|-------------------------------------------| | Calendar | The calendar container and month grid. | calendar, months | | CalendarMonth | A single month block. | month, name, week, weekday, days| | CalendarDay | Individual day cell (single-part component). | -- | | CalendarControl | Previous/next month navigation. | controls, button |

Development

pnpm install
pnpm run build        # build dist/ via tsup
pnpm run lint         # eslint (flat config)
pnpm test             # jest
pnpm run storybook    # storybook dev server

License

Apache-2.0