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

@surstromming/date-picker

v0.1.5

Published

A field that opens a calendar to pick a date.

Readme

@surstromming/date-picker

A field-shaped trigger that opens a Calendar in a Popover. Pure composition — it owns the open state, the label, and nothing else.

Dependency graph

graph LR
  date_picker["@surstromming/date-picker"]
  button["@surstromming/button"]
  calendar["@surstromming/calendar"]
  design["@surstromming/design"]
  icon["@surstromming/icon"]
  popover["@surstromming/popover"]
  scroll_area["@surstromming/scroll-area"]
  util["@surstromming/util"]
  date_picker --> button
  button --> design
  date_picker --> calendar
  calendar --> button
  calendar --> design
  calendar --> icon
  date_picker --> design
  date_picker --> icon
  date_picker --> popover
  popover --> design
  popover --> scroll_area
  popover --> util
  scroll_area --> design
  scroll_area --> util

Usage

<template>
  <Label id="due-label">Due date</Label>
  <DatePicker v-model="due" :min="today" aria-labelledby="due-label" />
</template>

<script setup lang="ts">
import { ref } from 'vue'
import { DatePicker } from '@surstromming/date-picker'

const due = ref<Date | null>(null)
const today = new Date()
</script>

Props

| Prop | Type | Default | Notes | | --------------- | -------------------------- | -------------- | -------------------------------------------- | | v-model | Date \| null | null | The selected day | | v-model:open | boolean | false | Bindable if the app has to drive it | | placeholder | string | 'Pick a date'| Shown while nothing is selected | | format | (date: Date) => string | — | Overrides the default Intl medium date | | min / max | Date | — | Forwarded to the calendar | | isDisabled | (date: Date) => boolean | — | Forwarded to the calendar | | weekStartsOn | sunday \| monday | monday | Forwarded to the calendar | | locale | string | — | Label and calendar; omitted means the browser's | | disabled | boolean | false | | | layer | popover \| menu \| modal | popover | Rung of the stacking ladder |

layer is forwarded to Popover. Inside a Dialog pass modal, or the calendar is drawn at 30 under a dialog at 70.

Fallthrough

inheritAttrs: falseid, aria-* and listeners land on the trigger button, so a Label's for reaches the focusable control.

Anatomy

Popover
├── trigger  Button outline, full width, left-aligned — a field, not a button
│            📅  "22 Jul 2026"   (placeholder in muted-foreground)
└── Calendar picking a day closes the popover

There's no typed text entry. A date you can type is a different control — an Input with parsing and its own error state — and folding it in here would make one component own two input models.

Accessibility

The trigger is a real button carrying aria-haspopup="dialog" and aria-expanded; the popover closes on Escape and outside click. Everything inside is the calendar's.