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

@phila/phila-ui-date-field

v0.0.8

Published

A date input component.

Downloads

418

Readme

DateField Component

Status: In Progress

DateField component built with TypeScript and Vite. Uses PhilaUI TextField's imask for input masking and dayjs for date manipulation. This component provides a user-friendly interface for selecting and inputting dates, with support for date pickers and customizable date formats.

Features

  • 🎯 TypeScript support with full type definitions
  • DatePicker option for easy date selection
  • Input masking for consistent date formats
  • Validation for date ranges

Installation

npm install @phila/phila-ui-date-field
# or
yarn add @phila/phila-ui-date-field
# or
pnpm add @phila/phila-ui-date-field

Usage

<script setup lang="ts">
import { DateField } from "@phila/phila-ui-date-field";
</script>
<template>
  <DateField
    v-model="selectedDate"
    :datePicker="true"
    :imaskProps="{
      mask: Date,
      pattern: 'm/d/Y',
      format: (date: Date) => dayjs(date).format('MM/DD/YYYY'),
      parse: (str: string) => dayjs(str, 'MM/DD/YYYY').toDate(),
    }"
  />
</template>

Props

| Prop | Type | Default | Description | | ----------------- | --------- | --------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------- | | format | string | "MM/DD/YYYY" | Date format string for display and parsing | | datePicker | boolean | false | Whether to show the date picker when the field is focused | | min | Date | undefined | Minimum selectable date | | max | Date | undefined | Maximum selectable date | | imaskProps | object | { mask: Date, pattern: 'm/d/Y', format: (date) => dayjs(date).format('MM/DD/YYYY'), parse: (str) => dayjs(str, 'MM/DD/YYYY').toDate() } | Props to pass to the imask input for masking and parsing | | datePickerOptions | object | {} | Additional options to pass to the DatePicker component | | modelValue | Date | undefined | The currently selected date (v-model) | | className | string | undefined | Additional CSS classes to apply | | label | string | undefined | Label for the date field | | placeholder | string | undefined | Placeholder text for the input field | | supportingText | string | undefined | Supporting text to display below the input field | | error | string | undefined | Error message to display below the input field | | leadingIcon | string | undefined | Name of the leading icon to display inside the input field | | trailingIcon | string | undefined | Name of the trailing icon to display inside the input field |

Events

| Event | Payload | Description | | ------------------- | ------- | -------------------------------------- | | update:modelValue | Date | Emitted when the selected date changes |

Examples

Basic DateField

<DateField v-model="selectedDate" />

Development

Install Dependencies

pnpm install

Run Demo

pnpm dev

Build Library

pnpm build

Type Check

pnpm type-check

License

MIT