New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-native-wheel-pick

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-wheel-pick

React native wheel picker iOS style with android.

  • 1.0.9
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.2K
decreased by-71.65%
Maintainers
1
Weekly downloads
 
Created
Source

react-native-wheel-pick

React native wheel picker for both iOS and android. (Support DatePicker)

This is not original but inspire by react-native-wheel-datepicker

How to use

npm install react-native-wheel-pick
react-native link react-native-wheel-pick

react-native-wheel-pick

Example code

import { Platform } from 'react-native';
import { Picker, DatePicker } from 'react-native-wheel-pick';

const isIos = Platform.OS === 'ios'

// use Picker
<Picker
  style={{ backgroundColor: 'white', width: 300, height: 215 }}
  selectedValue='item4'
  pickerData={['item1', 'item2', 'item3', 'item4', 'item5', 'item6', 'item7']}
  onValueChange={value => { }}
  itemSpace={30} // this only support in android
/>

// use DatePicker
<DatePicker
  style={{ backgroundColor: 'white', height: 215, width: isIos ? 300 : undefined }} 
  // android not support width
  onDateChange={date => { }}
/>

Note

  • For iOS use default PickerIOS / DatePickerIOS of React Native.
  • For Android use WheelPicker of WheelPicker
  • Line color is white in android. (Support Line style in future. Pull request welcome)
  • Line color is grey in IOS but it has bug line not show in Picker (iOS 11.4 not sure other version).

Pull request are welcome for more support in future (Text Style / Line Style / Line Bug)

More Example

// DatePicker set default choose date
<DatePicker
  style={{ height: 215, width: isIos ? 300 : undefined }}
  date={new Date('2018-06-27')} // Optional prop - default is Today
  onDateChange={date => { }}
/>

// DatePicker set min/max Date
<DatePicker
  style={{ height: 215, width: isIos ? 300 : undefined }}
  minimumDate={new Date('2000-01-01')}
  maximumDate={new Date('2050-12-31')}
  onDateChange={date => { }}
/>

Release Note

1.0.9 (June 27 2018)

[IOS]

  • Fix bug props date of DatePicker is not work right.

1.0.8 (June 27 2018)

  • Support props for date picker (date / minimumDate / maximumDate)

[IOS]

  • Fix bug cannot read property 'getTime' of null

1.0.7 (June 25 2018)

[Android]

  • Fix bug android value wrong from array

1.0.5 (June 24 2018)

  • Fix Lifecycle for support React 16 (Remove componentWillMount / componentWillReceiveProps)

[Android]

  • Fix bug onValueChange occur first time without change

1.0.4 (June 24 2018)

[Android]

  • Support compileSDKVersion 26

Keywords

FAQs

Package last updated on 26 Jun 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc