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

date-picker-minimalist

v1.0.1

Published

A modern, customizable date picker component with extensive styling options

Readme

Modern Date Picker

A modern, customizable date picker component that can be easily integrated into any web application.

Installation

npm install modern-date-picker-adnan

Usage

Basic Usage

<!-- Add this to your HTML -->
<div id="calendar"></div>

<!-- Include the CSS -->
<link rel="stylesheet" href="node_modules/modern-date-picker-adnan/dist/styles.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">

<!-- Include the JavaScript -->
<script src="node_modules/modern-date-picker-adnan/dist/index.js"></script>
// Initialize the date picker
const datePicker = new ModernDatePicker({
    container: '#calendar',
    onDateSelect: (date) => {
        console.log('Selected date:', date);
    }
});

// Get the selected date
const selectedDate = datePicker.getSelectedDate();

// Set a specific date
datePicker.setDate(new Date('2024-03-15'));

// Clean up when done
datePicker.destroy();

Customization Options

The date picker accepts the following options:

| Option | Type | Default | Description | |--------|------|---------|-------------| | container | string | HTMLElement | required | CSS selector or DOM element where the calendar will be rendered | | onDateSelect | function | undefined | Callback function that receives the selected date | | initialDate | Date | new Date() | Initial date to display | | showTodayButton | boolean | true | Whether to show the "Today" button | | showMonthYearSelectors | boolean | true | Whether to show month and year selectors | | width | string | '350px' | Width of the calendar container | | height | string | 'auto' | Height of the calendar container | | colors | object | see below | Custom colors for different calendar elements |

Color Options

The colors object accepts the following properties:

| Color Option | Type | Default | Description | |--------------|------|---------|-------------| | background | string | '#ffffff' | Background color of the calendar | | border | string | '#e0e0e0' | Border color of the calendar | | text | string | '#333333' | Text color | | headerBackground | string | '#f8f9fa' | Background color of the header | | todayBackground | string | '#e3f2fd' | Background color of today's date | | selectedBackground | string | '#2196f3' | Background color of the selected date | | selectedText | string | '#ffffff' | Text color of the selected date | | hoverBackground | string | '#f5f5f5' | Background color on hover | | otherMonthText | string | '#bdbdbd' | Text color for days from other months | | buttonHover | string | '#e3f2fd' | Background color of buttons on hover | | buttonActive | string | '#bbdefb' | Background color of buttons when active |

Example with Customization

const datePicker = new ModernDatePicker({
    container: '#calendar',
    width: '400px',
    height: '500px',
    colors: {
        background: '#f8f9fa',
        border: '#dee2e6',
        text: '#212529',
        headerBackground: '#e9ecef',
        todayBackground: '#cfe2ff',
        selectedBackground: '#0d6efd',
        selectedText: '#ffffff',
        hoverBackground: '#e9ecef',
        otherMonthText: '#adb5bd',
        buttonHover: '#e9ecef',
        buttonActive: '#dee2e6'
    },
    onDateSelect: (date) => {
        console.log('Selected date:', date);
    }
});

Methods

| Method | Description | |--------|-------------| | getSelectedDate() | Returns the currently selected date or null if no date is selected | | setDate(date: Date) | Sets the calendar to display and select a specific date | | destroy() | Removes the calendar and cleans up event listeners |

Styling

The date picker comes with a default style, but you can customize it by overriding the CSS classes:

  • .calendar-container - Main container
  • .calendar-header - Header section with navigation
  • .calendar-weekdays - Weekday labels
  • .calendar-grid - Grid containing the days
  • .calendar-day - Individual day cells
  • .current-month - Days of the current month
  • .other-month - Days from adjacent months
  • .today - Today's date
  • .selected - Selected date

License

MIT