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

react-native-granular-date-picker

v0.1.4

Published

A sleek and customizable React Native date picker that gives you granular control over day, month, and year selection with a smooth user experience.

Readme


React Native Granular Date Picker

A customizable date picker component for React Native applications. This component allows users to select dates with support for day, month, and year selection, and provides various styling options. Easy to integrate and fully customizable to fit your app's theme.


📸 Demo Screenshots

📸 Demo Screenshots


⚡ Features

  • Calendar view with day grid
  • Month and year navigation
  • Year selector mode
  • Highlight for today and selected date
  • Weekend highlighting
  • Customizable colors, fonts, and styles
  • Min and max year limits
  • Callbacks for date selection, confirmation, and cancellation
  • Responsive design based on device width

💿 Installation

npm install react-native-granular-date-picker
# or
yarn add react-native-granular-date-picker

No additional dependencies are required beyond React Native core components (FlatList, TouchableOpacity, etc.).


🚀 Usage

import React from 'react';
import { SafeAreaView, StyleSheet } from 'react-native';
import { GranularDatePicker } from 'react-native-granular-date-picker';

const App = () => {
  const handleSelectDate = (date: Date) => console.log('Selected:', date);
  const handleConfirm = (date: Date) => console.log('Confirmed:', date);
  const handleCancel = () => console.log('Cancelled');

  return (
    <SafeAreaView style={styles.container}>
      <GranularDatePicker
        initialDate={new Date()}
        minYear={2000}
        maxYear={2030}
        onSelectDate={handleSelectDate}
        onConfirm={handleConfirm}
        onCancel={handleCancel}
        primaryColor="#4CAF50"
      />
    </SafeAreaView>
  );
};

const styles = StyleSheet.create({
  container: { flex: 1, justifyContent: 'center', alignItems: 'center', backgroundColor: '#FFF' },
});

export default App;

Tip: Best used inside a modal (e.g., react-native-modal) to appear as a popup.


📝 Props

| Prop Name | Type | Default | Description | | ----------------- | ---------------------- | ---------------- | ----------------------------------- | | initialDate | Date | new Date() | Initial date to display | | minYear | number | 1950 | Minimum selectable year | | maxYear | number | 2050 | Maximum selectable year | | onSelectDate | (date: Date) => void | - | Callback when a date is selected | | onConfirm | (date: Date) => void | - | Callback when OK pressed | | onCancel | () => void | - | Callback when CANCEL pressed | | primaryColor | string | #007AFF | Primary color for selected elements | | secondaryColor | string | #E8F0FE | Secondary color for highlights | | textColor | string | #333 | Default day text color | | headerTextColor | string | #333 | Month/year header color | | arrowColor | string | #555 | Color for navigation arrows | | fontFamily | string | Platform default | Font for all text |

You can also pass custom styles for container, day cells, header, buttons, and year selector.


🎨 Customization Example

<GranularDatePicker
  primaryColor="#FF5722"
  secondaryColor="#FFEBEE"
  textColor="#212121"
  containerStyle={{ backgroundColor: '#FAFAFA', borderRadius: 20 }}
  selectedDayContainerStyle={{ backgroundColor: '#FF5722', borderWidth: 0 }}
/>

📌 Notes

  • Responsive to device width for day cells.
  • Weekends highlighted by default (customizable).
  • Placeholder days maintain the grid structure.
  • Combine with GranularTimePicker for full date-time selection.

Buy Me a Coffee

⚖ License

MIT License. See LICENSE for details.


🤝 Contributing

Contributions welcome! Open an issue or submit a pull request.