Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-native-wheel-picker-android

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-wheel-picker-android - npm Package Compare versions

Comparing version 0.1.7 to 0.1.8

2

package.json
{
"name": "react-native-wheel-picker-android",
"version": "0.1.7",
"version": "0.1.8",
"description": "Simple Wheel Picker for Android to use with react-native",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -5,3 +5,4 @@ # ReactNativeWheelPicker

A simple Wheel Picker for Android
A simple Wheel Picker for Android based on https://github.com/AigeStudio/WheelPicker
Also you can use multiple pickers, such as DatePicker or TimePicker

@@ -14,2 +15,64 @@ ## Installation Android

```js
import {WheelPicker, DatePicker, TimePicker} from 'react-native-wheel-picker-android'
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View
} from 'react-native';
class MyPickers extends Component {
render() {
let now = new Date()
let wheelPickerData = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
return (
<View style={styles.container}>
<WheelPicker
onItemSelected={(event)=>this.onItemSelected(event)}
isCurved
data={wheelPickerData}
style={styles.wheelPicker}/>
<DatePicker
initDate={now.toISOString()}
onDateSelected={(date)=>this.onDateSelected(date)}/>
<TimePicker
initDate={now.toISOString()}
onTimeSelected={(date)=>this.onTimeSelected(date)}/>
</View>
);
}
onItemSelected(event){
// do something
}
onDateSelected(date){
// do something
}
onTimeSelected(date){
// do something
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
alignItems: 'center',
},
wheelPicker: {
width:200,
height: 150
}
});
module.exports = MyPickers;
```
## Wheel Picker

@@ -97,3 +160,3 @@

| :------------ |:---------------:| :---------------:| :-----|
| onDateSelected | null | `func` | Callback when user select time {date: 'selectedDate'} |
| onTimeSelected | null | `func` | Callback when user select time {date: 'selectedTime'} |
| initDate | current date | `ISOString` | Initial selected time |

@@ -100,0 +163,0 @@ | hours | [1, 2, 3, .. 12] | `array` | hours array |

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