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

@almustarik/react-native-date-field

v0.1.0

Published

A customizable, animated date picker field for React Native (Expo & bare). Zero native dependencies.

Downloads

90

Readme

react-native-date-field

A customizable, animated date picker field for React Native — works in Expo and bare projects with zero native dependencies (built on React Native's own Animated, Modal, and ScrollView).

  • 🎞️ Smooth bottom-sheet animation (backdrop fade + spring slide-up)
  • 🎨 Fully themeable colors, typography, corner radius
  • 🌍 Custom month labels, column order (Y/M/D in any order), i18n-ready
  • 🧩 Two components: a ready-made DateField, or a headless DatePickerModal you drive yourself
  • 🪶 No Reanimated, no native modules, no linking — drop-in

Install

npm install @almustarik/react-native-date-field
# or
yarn add @almustarik/react-native-date-field

Peer dependencies (already in every RN app): react, react-native.


Quick start

import React, { useState } from "react";
import { View } from "react-native";
import { DateField } from "@almustarik/react-native-date-field";

export default function Example() {
  const [dob, setDob] = useState<Date | null>(null);

  return (
    <View style={{ padding: 20 }}>
      <DateField
        label="Date of Birth"
        value={dob}
        onChange={setDob}
        maximumDate={new Date()} // no future dates
      />
    </View>
  );
}

The field shows a formatted value (e.g. Jan 5, 2026), and tapping it opens an animated sheet with Year / Month / Day columns.


Headless usage (DatePickerModal)

Drive the picker from your own button:

import { DatePickerModal } from "@almustarik/react-native-date-field";

const [open, setOpen] = useState(false);
const [date, setDate] = useState<Date | null>(null);

<>
  <Button title="Pick a date" onPress={() => setOpen(true)} />
  <DatePickerModal
    visible={open}
    onRequestClose={() => setOpen(false)}
    value={date}
    onChange={setDate}
  />
</>

Theming

<DateField
  label="Appointment"
  value={date}
  onChange={setDate}
  theme={{
    accent: "#6C5CE7",
    onAccent: "#FFFFFF",
    text: "#1A1A1A",
    muted: "#9AA0A6",
    fieldBackground: "#F2F1FB",
    sheetBackground: "#FFFFFF",
    columnBackground: "#F7F7FB",
    border: "#E6E6EE",
    backdrop: "rgba(0,0,0,0.5)",
    borderRadius: 16,
  }}
  typography={{
    fontFamily: "Inter",
    titleSize: 16,
    titleWeight: "600",
    labelSize: 14,
    valueSize: 15,
    optionSize: 16,
  }}
/>

Localization & column order

<DateField
  value={date}
  onChange={setDate}
  columnOrder={["day", "month", "year"]}
  monthLabels={[
    "Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio",
    "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre",
  ]}
  title="Elegir fecha"
  doneLabel="Listo"
  format={(d) => d.toLocaleDateString("es-ES")}
/>

Custom trigger

<DateField
  value={date}
  onChange={setDate}
  renderField={({ display, open }) => (
    <Pressable onPress={open}>
      <Text>{display}</Text>
    </Pressable>
  )}
/>

API

DateField props

| Prop | Type | Default | Description | | --- | --- | --- | --- | | value | Date \| null | — | Selected date (controlled). | | onChange | (date: Date) => void | — | Called on confirm. Required. | | label | string | — | Label above the field. | | placeholder | string | "Select date" | Shown when empty. | | disabled | boolean | false | Disables the trigger. | | format | (date: Date) => string | MMM D, YYYY | Custom display formatter. | | leadingIcon / trailingIcon | ReactNode | chevron | Field icons. | | renderField | (params) => ReactNode | — | Replace the default trigger. | | style / fieldStyle | StyleProp<ViewStyle> | — | Wrapper / control styles. | | ...all core props below | | | |

DatePickerModal props

All core props plus:

| Prop | Type | Description | | --- | --- | --- | | visible | boolean | Whether the sheet is shown. Required. | | onRequestClose | () => void | Dismiss handler. Required. |

Core props (shared)

| Prop | Type | Default | Description | | --- | --- | --- | --- | | minimumDate | Date | 1900-01-01 | Earliest selectable date. | | maximumDate | Date | today | Latest selectable date. | | columnOrder | ("year"\|"month"\|"day")[] | ["year","month","day"] | Column layout order. | | monthLabels | string[] (12) | short EN | Month names. | | title | string | "Select date" | Sheet title. | | doneLabel | string | "Done" | Confirm button label. | | theme | DatePickerTheme | — | Color overrides. | | typography | DatePickerTypography | — | Font overrides. | | animationDuration | number | 260 | Open/close duration (ms). | | onOpen / onClose | () => void | — | Lifecycle callbacks. |

Exported helpers: defaultTheme, defaultTypography, DEFAULT_MONTHS_SHORT, and all TypeScript types.


License

MIT © Al Mustarik