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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@s77rt/react-native-date-picker

v3.1.1

Published

Native Date, Time, Datetime and Yearmonth Picker

Downloads

1,495

Readme

Features

  • 📅 Date picker
  • 🕜 Time picker
  • 🗓️ Datetime picker
  • 🌙 Yearmonth picker
  • 🔌 Supports iOS, Android and Web
  • 🎯 Selection is single and multiple
  • 💎 Renders in modal and inline
  • ✨ Highly customizable

Screenshots

| iOS | Android | mWeb - Safari | mWeb - Chrome | Web - Chrome | | :-------------------------------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------------------------------------: | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | | | | | | |

https://github.com/user-attachments/assets/f46f5132-3385-48c9-8d1b-ee478b60fba8

Installation

  • Using npm

    npm install @s77rt/react-native-date-picker
  • Using yarn

    yarn add @s77rt/react-native-date-picker

Usage

import { DatePicker } from "@s77rt/react-native-date-picker";
import type { DatePickerHandle } from "@s77rt/react-native-date-picker";

Modal

function Example() {
	const datePicker = useRef<DatePickerHandle>(null);
	const [selectedDate, setSelectedDate] = useState<Date | null>(null);

	return (
		<>
			<Text>Selected date: {selectedDate?.toLocaleDateString()}</Text>
			<View>
				<Button
					title="Select date 📅"
					onPress={() => datePicker.current?.showPicker()}
				/>
				<DatePicker
					ref={datePicker}
					type="date"
					value={selectedDate}
					onChange={setSelectedDate}
				/>
			</View>
		</>
	);
}

Inline

function Example() {
	const [selectedDate, setSelectedDate] = useState<Date | null>(null);

	return (
		<>
			<Text>Selected date: {selectedDate?.toLocaleDateString()}</Text>
			<DatePicker
				type="date"
				value={selectedDate}
				onChange={setSelectedDate}
				inline
			/>
		</>
	);
}

Multiple

function Example() {
	const [selectedDates, setSelectedDates] = useState<Date[]>([]);

	return (
		<>
			<Text>
				Selected dates:{" "}
				{selectedDates
					?.map((date) => date.toLocaleDateString())
					.join(", ")}
			</Text>
			<DatePicker
				type="date"
				value={selectedDates}
				onChange={setSelectedDates}
				multiple
				inline
			/>
		</>
	);
}

Props

Inherits View Props.

| Prop | Type | Description | | ---------- | ------------------------------------------------------------ | -------------------------------------------------------------------------------------------------- | | ref | Ref<DatePickerHandle> | Ref for the date picker handle. | | type | Type | The type of the picker. | | value | Date \| nullDate[] | The selected date(s). | | onChange | (value: Date \| null) => void(value: Date[]) => void | Callback when the user changes the selected date(s). | | min | Date | The earliest selectable date(s). | | max | Date | The latest selectable date(s). | | step | number | The stepping interval, in seconds. ⚫🔵 | | multiple | boolean | Whether the user can select multiple dates. ⚫🟢 | | inline | boolean | Whether the date picker should be displayed inline. ⚫🟢 | | options | Options | Options. Note: Must be memoized (useMemo). ⚫🟢 | | styles | Styles | Styles. Note: Must be memoized (useMemo). ⚫🟢 |

Type

The type of the picker and can be one of the following:

  • date
  • time
  • datetime ⚫🔵
  • yearmonth

Options

Various configuration options.

| Option | Type | Description | | ---------------- | ------------------------------------- | ------------------------------------------- | | locale | string | The locale BCP-47 identifier. ⚫ | | confirmText | string | The confirm button text. ⚫🟢 | | cancelText | string | The cancel button text. ⚫🟢 | | mode | "compact" \| "graphical" \| "wheel" | The display mode. ⚫ | | title | string | The title. 🟢 | | headline | string | The headline. 🟢 | | showModeToggle | boolean | Whether the mode toggle should be shown. 🟢 | | is24Hour | boolean | Whether the time should be in 24-hour. 🟢 |

Styles

Look and feel styles.

| Style | Type | Description | | ---------------------------------------- | ------------ | --------------------------------------------- | | accentColor | ColorValue | The accent color. ⚫ | | containerColor | ColorValue | The container color. 🟢 | | titleContentColor | ColorValue | The title color. 🟢 | | headlineContentColor | ColorValue | The headline color. 🟢 | | weekdayContentColor | ColorValue | The weekday letters color. 🟢 | | subheadContentColor | ColorValue | The month and year subhead labels color. 🟢 | | navigationContentColor | ColorValue | The year and arrow buttons color. 🟢 | | yearContentColor | ColorValue | The year color. 🟢 | | disabledYearContentColor | ColorValue | The disabled year color. 🟢 | | currentYearContentColor | ColorValue | The current year color. 🟢 | | selectedYearContentColor | ColorValue | The selected year color. 🟢 | | disabledSelectedYearContentColor | ColorValue | The disabled selected year color. 🟢 | | selectedYearContainerColor | ColorValue | The selected year container color. 🟢 | | disabledSelectedYearContainerColor | ColorValue | The disabled selected container color. 🟢 | | dayContentColor | ColorValue | The day color. 🟢 | | disabledDayContentColor | ColorValue | The disabled day color. 🟢 | | selectedDayContentColor | ColorValue | The selected day color. 🟢 | | disabledSelectedDayContentColor | ColorValue | The disabled selected day color. 🟢 | | selectedDayContainerColor | ColorValue | The selected day container color. 🟢 | | disabledSelectedDayContainerColor | ColorValue | The disabled selected day container color. 🟢 | | todayContentColor | ColorValue | The today color. 🟢 | | todayDateBorderColor | ColorValue | The today border color. 🟢 | | dayInSelectionRangeContainerColor | ColorValue | The selected days container color. 🟢 | | dayInSelectionRangeContentColor | ColorValue | The selected days color. 🟢 | | dividerColor | ColorValue | The divider color. 🟢 | | clockDialColor | ColorValue | The clock dial color. 🟢 | | selectorColor | ColorValue | The clock dial selector color. 🟢 | | periodSelectorBorderColor | ColorValue | The period selector border color. 🟢 | | clockDialSelectedContentColor | ColorValue | The selected number color. 🟢 | | clockDialUnselectedContentColor | ColorValue | The unselected number color. 🟢 | | periodSelectorSelectedContainerColor | ColorValue | The selected period container color. 🟢 | | periodSelectorUnselectedContainerColor | ColorValue | The unselected period container color. 🟢 | | periodSelectorSelectedContentColor | ColorValue | The selected period color. 🟢 | | periodSelectorUnselectedContentColor | ColorValue | The unselected period color. 🟢 | | timeSelectorSelectedContainerColor | ColorValue | The selected time container color. 🟢 | | timeSelectorUnselectedContainerColor | ColorValue | The unselected time container color. 🟢 | | timeSelectorSelectedContentColor | ColorValue | The selected time color. 🟢 | | timeSelectorUnselectedContentColor | ColorValue | The unselected time color. 🟢 |

Methods

Imperative handle methods.

| Method | Type | Description | | ------------ | ------------ | ----------------- | | showPicker | () => void | Shows the picker. |

Feedback

Every code review, bug report and feature request is appreciated! Please feel free to share your feedback.

License

MIT


⚫ iOS - 🟢 Android - 🔵 Web