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

@2_k/expo-2k-datetime-picker

v1.0.10

Published

The fastest fully customizable Expo date & time picker, written in TypeScript, supporting Expo Go, single date, time, date range, time range, datetime range selection, flexible date disabling, and dynamic color theming for iOS and Android.

Readme

@2_k/expo-2k-datetime-picker

The fastest fully customizable Expo date & time picker, written in TypeScript, supporting Expo Go, single date, time, date range, time range, datetime range selection, flexible date disabling, and dynamic color theming for iOS and Android.


Features

  • 📅 Date picker — single date selection
  • 🕐 Time picker — single time selection
  • 📆 Date range picker — select a start and end date
  • ⏱️ Time range picker — select a start and end time
  • 🗓️ Datetime & datetime range — combined date and time selection
  • 🚫 Flexible date disabling — disable specific days by custom logic
  • 🎨 Dynamic color theming — fully customizable accent color
  • 💙 Expo Go support — works out of the box with Expo Go
  • 📘 Fully written in TypeScript

Installation

npx expo install @2_k/expo-2k-datetime-picker

Preview

| Date | Time | | ----------------------------------------------- | ----------------------------------------------- | | Date Picker | Time Picker |

| Datetime Range | Time Range | | -------------------------------------------------- | ---------------------------------------------- | | Datetime Range | Time Range |


Usage

Example 1 — Date Picker

Single date selection with disabled days (Sunday, Wednesday, Saturday).

import { DateValueType } from "@2_k/expo-2k-datetime-picker";
import Calendar2kView from "@2_k/expo-2k-datetime-picker";
import { useState } from "react";

export default function App() {
  const [date, setDate] = useState<DateValueType>(new Date());

  return (
    <Calendar2kView
      onChangeDate={setDate}
      value={date}
      mode="date"
      color="black"
      disableDate={(date) => [0, 3, 6].includes(date.getDay())}
    />
  );
}

Example 2 — Datetime Picker

Combined date and time selection in a single picker.

import { DateValueType } from "@2_k/expo-2k-datetime-picker";
import Calendar2kView from "@2_k/expo-2k-datetime-picker";
import { useState } from "react";

export default function App() {
  const [date, setDate] = useState<DateValueType>(new Date());

  return (
    <Calendar2kView
      onChangeDate={setDate}
      value={date}
      mode="datetime"
      color="black"
      disableDate={(date) => [0, 3, 6].includes(date.getDay())}
    />
  );
}

Example 3 — Datetime Range Picker

Select a start and end datetime, useful for bookings and reservations.

import { DateValueType } from "@2_k/expo-2k-datetime-picker";
import Calendar2kView from "@2_k/expo-2k-datetime-picker";
import { useState } from "react";

export default function App() {
  const [date, setDate] = useState<DateValueType>({
    start: new Date(),
    end: new Date(),
  });

  return (
    <Calendar2kView
      onChangeDate={setDate}
      value={date}
      mode="datetime"
      color="black"
      disableDate={(date) => [0, 3, 6].includes(date.getDay())}
    />
  );
}

Example 4 — Time Range Picker

Select a start and end time, useful for timetable.

import { DateValueType } from "@2_k/expo-2k-datetime-picker";
import Calendar2kView from "@2_k/expo-2k-datetime-picker";
import { useState } from "react";

export default function App() {
  const [date, setDate] = useState<DateValueType>({
    start: "09:00:00",
    end: "10:00:00",
  });

  return (
    <Calendar2kView
      onChangeDate={setDate}
      value={date}
      mode="time"
      color="black"
    />
  );
}

Props

| Prop | Type | Required | Description | | --------------- | ------------------------------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------- | | onChangeDate | (value: DateValueType) => void | ❌ | Callback fired when the user selects a date or range | | value | DateValueType | ❌ | Current selected value — a Date or { start: Date, end: Date } or HH:MM:SS or { start: 'HH:MM:SS', end: 'HH:MM:SS' } object | | locales | Intl.LocalesArgument | ❌ | Locale for displaying month/day names and time format (e.g. "fr", "en-US"). Defaults to device locale | | mode | "date" \| "time" \| "datetime" | ❌ | Picker mode | | color | string | ❌ | Accent color for the picker UI (any valid CSS/RN color) | | min | Date | ❌ | Earliest selectable date — all dates before this are automatically disabled | | max | Date | ❌ | Latest selectable date — all dates after this are automatically disabled | | disableDate | (date: Date) => boolean | ❌ | Function to disable specific dates — return true to disable | | placeholder | string | ❌ | Text shown in the trigger button when no date is selected yet | | customTrigger | (onToggle: () => void) => React.ReactNode | ❌ | Custom element to replace the default trigger button | | disabled | boolean | ❌ | Disables the entire picker — the trigger becomes non-interactive |


Modes

| Mode | value type | Description | | ---------- | -------------------------- | ------------------------- | | date | Date or { start, end } | Pick a date or a range | | time | Date or { start, end } | Pick a time or a range | | datetime | Date or { start, end } | Pick date+time or a range |


Disabling Dates

Pass a function to disableDate that receives a Date and returns true to disable it:

// Disable weekends (Saturday = 6, Sunday = 0)
disableDate={(date) => [0, 6].includes(date.getDay())}

// Disable past dates
disableDate={(date) => date < new Date()}

// Disable a specific date
disableDate={(date) => date.toDateString() === new Date("2025-12-25").toDateString()}

You can also use min and max for simpler range-based disabling:

// Only allow dates in 2025
<Calendar2kView
  min={new Date("2025-01-01")}
  max={new Date("2025-12-31")}
  ...
/>

Platform Support

| Platform | Supported | | -------- | -------------- | | iOS | ✅ | | Android | ✅ | | Expo Go | ✅ | | Web | 🚧 Coming soon |


Support & Donation

If @2_k/expo-2k-datetime-picker saved you time, consider buying me a coffee! ☕
Your support helps me maintain this project and build more free open-source tools. 🙏

💛 Donate via Orange Money (Madagascar)

Send your donation directly to:

my Orange Money 📱 +261 37 65 442 50

Or Mvola 📱 +261 34 68 814 74

Or Airtel Money 📱 +261 33 36 613 20

Any amount is deeply appreciated! 🤝


MIT