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 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-native-datetimepicker-pro

v1.0.4

Published

A customizable calendar, time & month picker for React Native (including Persian Jalaali calendar & locale)

Downloads

12

Readme

React Native DateTimePicker Pro 📆

A customizable calendar, time & month picker for React Native (including Persian Jalaali calendar & locale). For more information and documentation, please visit website

Installation

npm package users

npm i react-native-datetimepicker-pro

yarn package users

yarn add react-native-datetimepicker-pro

Screenshot_1652875688

Screenshot_1652875715

Screenshot_1652875701

Examples

Basic example

import React, { useState } from 'react';
import DatePicker from 'react-native-datetimepicker-pro';

const BasicUsage = () => {
  const [selectedDate, setSelectedDate] = useState('');

  return (
    <DatePicker
      onSelectedChange={date => setSelectedDate(date)}
    />
  );
};

Jalali Calendar

import React from 'react';
import DatePicker, { getFormatedDate } from 'react-native-datetimepicker-pro';

const JalaliExample = () => {
  return (
    <DatePicker
      isGregorian={false}
      options={{
        defaultFont: 'Shabnam-Light',
        headerFont: 'Shabnam-Medium',
      }}
      selected={getFormatedDate(new Date(), 'jYYYY/jMM/jDD')}
    />
  );
};

API

Props

| Prop | Type | Optional | Default | Description | | ---------------- | ------ | ------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------- | | isGregorian | bool | Yes | true | Gregorian calendar is the default. if shamsi is required set this prop to false. | | selected | string | Yes | null | for gregorian the format should be 'YYYY-MM-DD' and for shamsi 'jYYYY/jMM/jDD' | | onSelectedChange | func | No (required) | | Selected date is returned as a parameter to the function. | | options | props | Yes | | Some visual effects like font and colors are asigned threw this prop. Check the options prop description table for more info. |

Options Props

| Prop | Type | Optional | Default | Description | | ------------------ | ------ | -------- | ------------------------- | ------------------------------ | | defaultFont | string | Yes | 'System' | font of dates and times. | | headerFont | string | Yes | 'System' | font of the headers | | textFontSize | int | Yes | 15 | | textHeaderFontSize | int | Yes | 17 | | mainColor | string | Yes | #61dafb | any color format is supported. | | backgroundColor | string | Yes | #fff | any color format is supported. | | textHeaderColor | string | Yes | #212c35 | any color format is supported. | | textDefaultColor | string | Yes | #2d4150 | any color format is supported. | | selectedTextColor | string | Yes | #2d4150 | any color format is supported. | | textSecondaryColor | string | Yes | #7a92a5 | any color format is supported. | | borderColor | string | Yes | #rgba(122, 146, 165, 0.1) | any color format is supported. |