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

@sauravluitel/date-time-picker-custom

v1.0.4

Published

Premium React Date and Time Pickers with dedicated Mobile and Desktop UI

Readme

@sauravluitel/date-time-picker-custom

npm version license

A professional, high-performance, and responsive React Date and Time picker library. Built with Vite, Framer Motion, and Lucide React, it offers dedicated, premium UIs for both Desktop and Mobile devices.

🔗 Live Demo

https://custom-date-time-picker.netlify.app/


✨ Features

  • 📱 Dedicated Mobile UI:
    • Scroll-Wheel Select: Smooth, iOS-style wheel selects for Years, Months, Days, and Time.
    • Touch Optimized: Large tap targets and haptic-friendly scrolling.
    • React Portal Support (NEW): Renders via Portals to stay above all parents, even those with transform or filter.
  • 🖥️ Premium Desktop UI:
    • Elegant Calendar: Full-featured grid with quick navigation between months and years.
    • Grid Time Select: Fast and efficient grid selection for precision time setting.
  • 🔌 Form Ready (NEW in v1.0.1):
    • Synthetic Events: Emits standard { target: { name, value } } objects.
    • Drop-in Support: Seamlessly integrates with React Hook Form, Formik, and Yup.
    • Standard Formats: Always returns standard strings (YYYY-MM-DD and HH:mm).
  • 🛡️ Submission Protection: All internal buttons are typed as type="button" to prevent accidental parent form submissions.
  • 🎨 Glassmorphism & Themes:
    • Manual Theme Control: Toggle between Dark/Light modes regardless of system settings.
    • High Visibility: High z-index (999999) ensures pickers always stay on top.
    • Modern Aesthetics: Sleek glassmorphism with smooth micro-animations.

🚀 Installation

npm install @sauravluitel/date-time-picker-custom
# or
yarn add @sauravluitel/date-time-picker-custom

⚠️ Important: CSS Import

To use the premium styles, import the CSS file in your main entry file (e.g., main.js or App.js):

import '@sauravluitel/date-time-picker-custom/style.css';

🛠️ Usage

Basic Example

import React, { useState } from 'react';
import { DatePicker, TimePicker } from '@sauravluitel/date-time-picker-custom';

function App() {
  const [date, setDate] = useState('2024-03-02');
  const [time, setTime] = useState('14:30');

  return (
    <div className="form-group">
      <DatePicker 
        value={date} 
        onChange={(e) => setDate(e.target.value)} 
      />
      
      <TimePicker 
        value={time} 
        onChange={(e) => setTime(e.target.value)} 
        use12h={true} 
      />
    </div>
  );
}

📋 Form Integration

React Hook Form

import { useForm, Controller } from "react-hook-form";
import { DatePicker } from "@sauravluitel/date-time-picker-custom";

function MyForm() {
  const { control, handleSubmit } = useForm();

  return (
    <form onSubmit={handleSubmit(data => console.log(data))}>
      <Controller
        name="birthDate"
        control={control}
        render={({ field }) => (
          <DatePicker 
            {...field} 
            placeholder="Select your birthday"
          />
        )}
      />
      <button type="submit">Submit</button>
    </form>
  );
}

⚙️ Props Reference

DatePicker

| Prop | Type | Default | Description | | :--- | :--- | :--- | :--- | | value | string | "" | Date in YYYY-MM-DD format. | | onChange | function | - | Returns standard synthetic event. | | placeholder | string | "YYYY/MM/DD" | Placeholder for the input field. | | name | string | - | Name for form integration. | | disabled | boolean | false | Disables all interactions. | | isDarkMode | boolean | undefined | Forces Dark Mode (true) or Light Mode (false). Default follows system. |

TimePicker

| Prop | Type | Default | Description | | :--- | :--- | :--- | :--- | | value | string | "" | Time in HH:mm (24h) format. | | onChange | function | - | Returns standard synthetic event. | | use12h | boolean | true | Show AM/PM selector. | | showSeconds| boolean | false | Show seconds selector. | | disabled | boolean | false | Disables all interactions. | | isDarkMode | boolean | undefined | Forces Dark Mode (true) or Light Mode (false). Default follows system. |


💻 Tech Stack

  • React 18+
  • Framer Motion (Animations)
  • Lucide React (Icons)
  • date-fns (Date logic)

🚀 Roadmap

  • [ ] BS (Bikram Sambat Support): Coming soon! 🇳🇵

📄 License

MIT © Saurav Luitel