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

@reelse/vali-dates

v1.0.17

Published

The customizable, rule-based, dateTime picker for React!

Readme

ValiDates (In Progress)

The customizable, rule-based, dateTime picker for React!

TOC

Ethos

ValiDates is a dateTime picker for React that aims to simply provide you the ability to setup dateTime ranges that fall into one of four categories:

  • Info: This is a legitimate dateTime that the end user should be able to select.
    i.e. "I started working today at 8am"
    rules={} // ValiDate is permissive by default. This would let the user select any date since 0CE!
    rules={ level: 'info', range: 'before', date: new Date('3000-1-1'), message: 'Thanks for clocking in!' }

  • Error: The end user should not be able to select this dateTime because it doesn't make sense for your application. The end user is shown a message but cannot submit.
    i.e. "I started working yesterday at 2am"

    const startOfToday = new Date()
    startOfToday.setHours(0, 0, 0, 0)
    
    const endOfToday = new Date()
    endOfToday.setHours(23, 59, 59, 999)
    
    const message = 'The selected date must be today.'
    
    rules={[
      { level: 'error',  range: 'before', date: startOfToday, message },
      { level: 'error',  range: 'after', date: endOfToday, message },
    ]}
  • Warning: The end user is allowed to select this date, but is shown a warning message letting them know that it may not be what they expected.
    i.e. "I was scheduled to work at 8am, but I started working at 7am"

    const startOfWork = new Date()
    startOfWork.setHours(8, 0, 0, 0)
    
    rules={[
      { level: 'warning', range: 'before', date: startOfWork, message: 'Are you sure you meant to start before 8am?' },
    ]}

Rules are in priority order. ValiDates selects the first rule that fits each possible dateTime. If no rule fits, the dateTime is valid.

Installation

yarn add @reelse/vali-dates

How to Use

Example: Simplest and Most Permissive

import { ValiDatesTimePicker } from '@reelse/vali-dates'

// Allow the user to select any date at any time with the default styling
return <ValiDatesTimePicker rules={} />

Example: Add Rules

const startOfToday = new Date()
startOfToday.setHours(0, 0, 0, 0)

const endOfToday = new Date()
endOfToday.setHours(23, 59, 59, 999)

const startOfWork = new Date()
startOfWork.setHours(8, 0, 0, 0)

const errorMessage = 'The selected date must be today.'
const warningMessage = 'Are you sure you meant to start before 8am?'

<ValiDatesTimePicker
  rules={[
    { level: 'error',  range: 'before', date: startOfToday, errorMessage },
    { level: 'error',  range: 'after', date: endOfToday, errorMessage },
    { level: 'warning', range: 'before', date: startOfWork, message: warningMessage },
  ]}
/>

Contributing to the Project

Thanks for your help! To contribute:

  • clone the repo
  • yarn
  • yarn storybook
  • make your changes on a new branch
  • create a PR against main

Some features we'd like to add soon:

  • Cypress Tests
  • Aria/Accessibility Support
  • Keyboard Navigation Support
  • External Styling
  • Bottom Drawer Display Option

Publishing to NPM

This can only be done by those with access to the npm organization.

  • yarn build
  • npm login
  • npm publish --access public and follow the prompts to increase the version.