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-limit-timepicker

v1.2.0

Published

React Native wheel scroll Time Picker

Downloads

26

Readme

react-native-limit-timepicker

npm version license

React Native Limit Timepicker is a library that provides a LIMITABLE and CUSTOMIZABLE timepicker component for React Native applications.

Features

  • Smooth Animated Timepicker
  • Can limit the minimum time and maximum time in scroll picker
  • Easy to use
  • Consistent look and feel on iOS and Android
  • Customizable font size, colors and animation duration
  • Implemented with typescript
If you love this library, and want to support it, let's give us a star, you will be a ray of sunshine in our lives 🥰

Getting started

npm install react-native-limit-timepicker --save

or

yarn add react-native-limit-timepicker

Timepicker Props

| Props | Params | isRequire | Description | | -------------------- | ----------------------- | --------------------------------- | ---------------------------------------------------------------------------- | | disabled | boolean | No | Disable the scrollable of Timepicker | | customHourData | Array<ItemT = string | number> | No | String or number array of the hour (Ex: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]) | | customMinutesData | Array | No | String or number array of the minute (Ex: [0, 30]) | | customPeriodData | Array | No | String or number array of the minute (Ex: ['am, 'pm']) | | renderTextHour | (data: ItemT) => string | No | Customize the text of the hour item | | renderTextMinute | (data: ItemT) => string | No | Customize the text of the minute item | | renderTextPeriod | (data: ItemT) => string | No | Customize the text of the period item | | onChangeHour | (value: ItemT | undefined, index: number) => void | No | Called when the hour's momentum scroll ends (scroll which occurs as the ScrollView glides to a stop) | | onChangeMinute | (value: ItemT | undefined, index: number) => void | No | Called when the minute's momentum scroll ends (scroll which occurs as the ScrollView glides to a stop) | | onChangePeriod | (value: ItemT | undefined, index: number) => void | No | Called when the period's momentum scroll ends (scroll which occurs as the ScrollView glides to a stop) | | time | Date | No | Set default time | | minDate | Date | No | the minimum date can selected | | maxDate | Date | No | the maximum date can selected | | containerStyle | ViewStyle | No | Styling for view container | | scrollHourStyle | ViewStyle | No | Styling for hour scroll View | | scrollMinuteStyle | ViewStyle | No | Styling for minute scroll View | | scrollPeriodStyle | ViewStyle | No | Styling for period scroll View | | highlightColor | String | No | Border color for top and bottom centered item in scroll timepicker container | | highlightBorderWidth | Number | No | Border width for top and bottom line selected in scroll timepicker container | | hourTextStyle | TextStyle | No | Styling for hour text | | minuteTextStyle | TextStyle | No | Styling for minute text | | periodTextStyle | TextStyle | No | Styling for period text | | activeItemTextStyle | TextStyle | No | Styling for selected text | | itemHeight | Number | No | Customize item height in each scroll container | | wrapperHeight | Number | No | Customize wrapper height of scroll container | | wrapperBackground | String | No | Customize background color of scroll container |

Timepicker example

  import React, { useState } from 'react';
  import { View } from 'react-native';
  import TimePicker from 'react-native-limit-timepicker';

  const TimePickerComponent = () => {
    return (
      <View style={styles.container}>
        <TimePicker
          customMinutesData={[0, 15, 30, 45]}
          onChangeHour={value => console.log('hour: ', value)}
          onChangeMinute={value => console.log('minute: ', value)}
          onChangePeriod={value => console.log('period: ', value)}
          minDate={new Date()}
          time={new Date()}
        />
      </View>
    );
  };

  export default TimePickerComponent;

  const styles = StyleSheet.create({
    container: {
      backgroundColor: 'white',
      padding: 16,
    },
  });

Support react-native-limit-timepicker <3