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-12hours-timepicker

v1.0.15

Published

12 hours analog time picker

Downloads

19

Readme

react-native-12hours-timepicker

Time picker for US time standart

Installation

Using NPM:

$ npm i react-native-12hours-timepicker

Using Yarn:

$ yarn add react-native-12hours-timepicker

Usage

import { TimePicker, AnalogClock12 } from 'react-native-12hours-timepicker'
<TimePicker
  topPadding={0}
  dayPeriods={{'11:00 – 14:00': 'red'}} // max hour 24:00
  value={'13:00'} // 24 hours format
  onChange={(v) => onTimeChange(v)}
  clockWidth={272}
  periodSeparator="–"
  title="Select time"
  clockNumberShift={50}
/>
<AnalogClock12
  topPadding={0}
  // onHourSelect run when Gesture.Pan.**onBegin**() and Gesture.Pan.**onUpdate**()
  // hour in range from 0 to 11
  onHourSelect={(hour: number, minutes: number) => onTimeChanged(hour, minutes)}
  value={'13:00'} // 24 hours format
  periods={{'07:00 – 09:00': 'red'}} // max hour 12:00
  // onTimeSelectEnd run when Gesture.Pan.**onFinalize**()
  // hour in range from 0 to 11
  onTimeSelectEnd={(hour: number, minutes: number) => onTimeSelectEnd(hour, minutes)}
  width={272}
  periodSeparator="–"
  clockNumberShift={50}
/>

Options

TimePicker

| Props | Type | Data | Default | | --- | --- | --- | --- | | title | String | Time picker title | 'Select time' | | topPadding | Number | Status bar height for pan responder if work custom safe-area-view, such as react-native-safe-area-context | 0 | | clockWidth | Number | Default width for analog clock | 272 | | value | String | Value in 24 hours format | '00:00' | | dayPeriods | { period: color } | Period in 24 hours format and color for this period, { '11:00 – 14:00': '#FFA98D' } | {} | | onChange | (string): void | Return value in 24 hours format, '14:00' | - | | periodSeparator | String | Periods keys separator | '–' | | clockNumberShift | Number | Offset of the number of hours from the outer point | 50 | | clockBorderColor | String | Clock border color | '#F7F7F7' | | hourDotFillColor | String | Clock hour dot fill color | '#EBEBEB' | | hourDotBorderColor | String | Clock hour dot border color | '#F7F7F7' | | style | StyleProp | Styles for main container | - | | timeContainerStyle | StyleProp | Styles for numeric timer container | - | | titleStyle | StyleProp | Styles for title | - | | timeStyle | StyleProp | Styles for numeric timer text | - | | switcherStyle | StyleProp | Styles for meridiem switcher container | - | | clockFaceNumberStyle | StyleProp | Styles for number literal on clock face | - | | switcherTextStyle | StyleProp | Styles for meridiem switcher text | - |

AnalogClock12

| Props | Type | Data | Default | | --- | --- | --- | --- | | style | StyleProp | Styles for clock container | - | | clockFaceNumberStyle | StyleProp | Styles for number literal on clock face | - | | width | Number | Clock width | 272 | | topPadding | Number | Status bar height for pan responder if work custom safe-area-view, such as react-native-safe-area-context | 0 | | value | String | Value in 24 hours format | '00:00' | | periodSeparator | String | Periods keys separator | '–' | | clockBorderColor | String | Clock border color | '#F7F7F7' | | hourDotFillColor | String | Clock hour dot fill color | '#EBEBEB' | | hourDotBorderColor | String | Clock hour dot border color | '#F7F7F7' | | clockNumberShift | Number | Offset of the number of hours from the outer point | 50 | | periods | Period in 24 hours format and color for this period, but max time 12:00, { '09:00 – 12:00': '#FFA98D' } | {} | | onHourSelect | (hour: number, minutes: number) => void | Run when Gesture.Pan handled onBegin and onUpdate. Hour in range from 0 to 11 | - | | onTimeSelectEnd | (hour: number, minutes: number) => void | run when Gesture.Pan handled onFinalize. Hour in range from 0 to 11 | - |

Authors