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

react-chakra-ui-datepicker

v0.1.0

Published

A React date picker component built with Chakra UI

Readme

React Chakra UI Date Picker

A modern, accessible React date picker component built with Chakra UI and TypeScript.

example

✨ Features

  • 🎨 Chakra UI Integration - Seamlessly integrates with Chakra UI theme system
  • 📱 Responsive Design - Works perfectly on mobile and desktop
  • 🎯 TypeScript Support - Full TypeScript support with type definitions
  • Accessible - Built with accessibility in mind
  • 🎛️ Customizable - Easy to customize with Chakra UI theme
  • 📅 Date Range Support - Support for single date and date range selection
  • 🌍 Internationalization - Support for multiple languages and date formats

📦 Installation

npm install react-chakra-ui-datepicker
# or
yarn add react-chakra-ui-datepicker

🔧 Peer Dependencies

This library requires the following peer dependencies:

npm install @chakra-ui/react @chakra-ui/icons @emotion/react @emotion/styled framer-motion

🚀 Quick Start

Basic Usage

import React from 'react'
import { ChakraProvider } from '@chakra-ui/react'
import { DateSingleInput } from 'react-chakra-ui-datepicker'

function App() {
  return (
    <ChakraProvider>
      <DateSingleInput 
        name="date"
        placeholder="Select a date"
      />
    </ChakraProvider>
  )
}

Date Range Selection

import { DateRangeInput } from 'react-chakra-ui-datepicker'

function DateRangeExample() {
  return (
    <DateRangeInput 
      startDatePlaceholder="Start date"
      endDatePlaceholder="End date"
      dateFormat="dd/MM/yyyy"
    />
  )
}

With React Hook Form

import { useForm } from 'react-hook-form'
import { DateSingleInput, DateRangeInput } from 'react-chakra-ui-datepicker'

function FormExample() {
  const { register, handleSubmit } = useForm()

  const onSubmit = (data) => {
    console.log('Form data:', data)
  }

  return (
    <form onSubmit={handleSubmit(onSubmit)}>
      <DateSingleInput 
        ref={register}
        name="singleDate"
        placeholder="Select date"
      />
      
      <DateRangeInput 
        startRef={register}
        endRef={register}
        startDateName="startDate"
        endDateName="endDate"
      />
      
      <button type="submit">Submit</button>
    </form>
  )
}

🎨 Customization

Theme Integration

import { ChakraProvider, extendTheme } from '@chakra-ui/react'

const theme = extendTheme({
  colors: {
    brand: {
      500: '#3182ce',
      600: '#2b6cb0',
    }
  }
})

function App() {
  return (
    <ChakraProvider theme={theme}>
      <DateSingleInput />
    </ChakraProvider>
  )
}

Custom Styling

import { Datepicker } from 'react-chakra-ui-datepicker'

function CustomDatepicker() {
  const customStyles = {
    datepickerContainer: {
      background: 'white',
      borderRadius: 'lg',
      shadow: 'xl',
    },
    day: {
      selected: {
        background: 'blue.500',
        color: 'white',
      }
    }
  }

  return (
    <Datepicker 
      styles={customStyles}
      overwriteDefaultStyles={true}
    />
  )
}

📚 API Reference

DateSingleInput Props

| Prop | Type | Default | Description | |------|------|---------|-------------| | name | string | - | Input field name | | placeholder | string | - | Placeholder text | | dateFormat | string | "MM/dd/yyyy" | Date format | | onChange | function | - | Change handler | | value | Date | - | Current value | | ref | RefObject | - | React ref |

DateRangeInput Props

| Prop | Type | Default | Description | |------|------|---------|-------------| | startDateName | string | - | Start date field name | | endDateName | string | - | End date field name | | startDatePlaceholder | string | - | Start date placeholder | | endDatePlaceholder | string | - | End date placeholder | | dateFormat | string | "MM/dd/yyyy" | Date format | | startRef | RefObject | - | Start date ref | | endRef | RefObject | - | End date ref |

Datepicker Props

| Prop | Type | Default | Description | |------|------|---------|-------------| | numberOfMonths | number | 2 | Number of months to display | | vertical | boolean | false | Vertical layout | | styles | object | - | Custom styles | | overwriteDefaultStyles | boolean | false | Overwrite default styles | | phrases | object | - | Custom phrases/text |

🌍 Internationalization

import { phrases } from 'react-chakra-ui-datepicker'

const thaiPhrases = {
  ...phrases,
  datepickerStartDatePlaceholder: 'เลือกวันที่เริ่มต้น',
  datepickerEndDatePlaceholder: 'เลือกวันที่สิ้นสุด',
}

<DateRangeInput phrases={thaiPhrases} />

🧪 Development

Commands

# Start development
npm start

# Build library
npm run build

# Run tests
npm test

# Start Storybook
npm run storybook

# Run example
npm run start-example

Storybook

View interactive examples and documentation:

npm run storybook

Then open http://localhost:6007

📄 License

MIT © Chris Bull

🤝 Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📝 Changelog

v0.1.0

  • Initial release
  • Basic date picker functionality
  • Chakra UI integration
  • TypeScript support
  • Date range selection
  • React Hook Form integration

🐛 Issues

If you encounter any issues, please file an issue.

📞 Support

For support, email [email protected] or join our Slack channel.