Giter Site home page Giter Site logo

pinguinjkeke / react-native-wheel-datepicker Goto Github PK

View Code? Open in Web Editor NEW
75.0 75.0 80.0 683 KB

Android & iOS iOS-style Picker & DatePicker Components for ReactNative

Home Page: https://www.npmjs.com/package/react-native-wheel-datepicker

JavaScript 62.59% Java 37.41%
android crossplatform date-picker ios picker react-native wheel

react-native-wheel-datepicker's People

Contributors

falsecz avatar hedaktibo avatar lesliesam avatar pinguinjkeke avatar royipressburger avatar rvgroup avatar windy911 avatar wusuopu avatar xxsnakerxx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

react-native-wheel-datepicker's Issues

Release apk

When we are going to release apk then this npm create an issue, please help how to fix this

12 hrs mode

How can I enable AM/PM mode on the DatePicker component, as my default mode is 24-hours?

Installation

Do I need to follow the instructions from the original component, i.e. adding stuff to the android project?

itemStyle not getting pass to WheelCurvedPicker.Item

¿Could be possible to override default item style for android?

As per WheelCurvedPicker.android.js file, the item style seems to sets only the default values:

static defaultProps = {
    textSize: 26,
    itemSpace: 20,
    itemStyle: null,
    textColor: '#333',
  };

and there's no current way to dynamic override them, rather than changing the code directly.

"CustomDatePicker" does not exist

Hi,
I installed "react-native-custom-datepicker-ios" and this lib, and in my js page,

import {registerCustomDatePickerIOS} from 'react-native-wheel-datepicker';
import CustomDatePickerIOS from 'react-native-custom-datepicker-ios';
const DatePicker = registerCustomDatePickerIOS(CustomDatePickerIOS);


<DatePicker
                            date={this.state.date}
                            mode="date"
                            textSize={36}
                            textColor='red'
                            onDateChange={date => this.setState({date})}
                            style={{width: '100%'}}
                            />

the error tip is "Invariant Violation:Native component for 'CustomDatePicker' does not exist"

plz help me ,thx

Uprade AigeStudio/WheelPicker

Hello, could you please upgrade the component to use AigeStudio/WheelPicker version at least 1.1.1? It fixes a lot of bugs.

For example now I am getting this error and I am hoping it is fixed in a newer version:

E/unknown:ReactNative: Exception in native call
java.lang.IndexOutOfBoundsException: Invalid index 0, size is 0
at java.util.ArrayList.throwIndexOutOfBoundsException(ArrayList.java:255)
at java.util.ArrayList.get(ArrayList.java:308)
at com.aigestudio.wheelpicker.core.AbstractWheelPicker.onSizeChanged(AbstractWheelPicker.java:234)
at com.aigestudio.wheelpicker.view.WheelCrossPicker.onSizeChanged(WheelCrossPicker.java:69)
at android.view.View.sizeChange(View.java:15703)
at android.view.View.setFrame(View.java:15676)
at android.view.View.layout(View.java:15592)
at com.facebook.react.uimanager.NativeViewHierarchyManager.updateLayout(NativeViewHierarchyManager.java:199)
at com.facebook.react.uimanager.NativeViewHierarchyManager.updateLayout(NativeViewHierarchyManager.java:184)
at com.facebook.react.uimanager.UIViewOperationQueue$UpdateLayoutOperation.execute(UIViewOperationQueue.java:125)
at com.facebook.react.uimanager.UIViewOperationQueue$1.run(UIViewOperationQueue.java:776)
at com.facebook.react.uimanager.UIViewOperationQueue.flushPendingBatches(UIViewOperationQueue.java:855)
at com.facebook.react.uimanager.UIViewOperationQueue.access$1600(UIViewOperationQueue.java:46)
at com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.doFrameGuarded(UIViewOperationQueue.java:900)
at com.facebook.react.uimanager.GuardedFrameCallback.doFrame(GuardedFrameCallback.java:31)
at com.facebook.react.modules.core.ReactChoreographer$ReactChoreographerDispatcher.doFrame(ReactChoreographer.java:136)
at com.facebook.react.modules.core.ChoreographerCompat$FrameCallback$1.doFrame(ChoreographerCompat.java:107)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:765)
at android.view.Choreographer.doCallbacks(Choreographer.java:580)
at android.view.Choreographer.doFrame(Choreographer.java:549)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:753)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5221)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
D/AndroidRuntime: Shutting down VM
E/UncaughtException: java.lang.ArrayIndexOutOfBoundsException: length=0; index=-1
at java.util.ArrayList.get(ArrayList.java:310)
at com.aigestudio.wheelpicker.view.WheelCrossPicker.confirmData(WheelCrossPicker.java:144)
at com.aigestudio.wheelpicker.view.WheelCrossPicker.run(WheelCrossPicker.java:125)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5221)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
D/FA: Event not sent since app measurement is disabled
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.slideslive.mobile, PID: 6114
java.lang.ArrayIndexOutOfBoundsException: length=0; index=-1
at java.util.ArrayList.get(ArrayList.java:310)
at com.aigestudio.wheelpicker.view.WheelCrossPicker.confirmData(WheelCrossPicker.java:144)
at com.aigestudio.wheelpicker.view.WheelCrossPicker.run(WheelCrossPicker.java:125)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5221)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)

Picker color on iOS

I was able to change the color on iOS of the Picker component only by setting the itemStyle property (with the color). I had to update the picker.js file on line 23 to this:
itemStyle: Text.propTypes.style,

datetime mode is not working on Android

screen shot 2018-07-17 at 5 57 28 pm

Here's my code
<DatePicker
date={datetime}
style={[styles.datepicker, { marginTop: 16 }]}
onDateChange={(val) => this.onDateChange(val)}
mode="date"
minuteInterval={15}
/>

      <Picker
        selectedValue={duration}
        pickerData={this.durationData}
        style={styles.datepicker}
        onValueChange={val => this.onDurationChange(val)}
      />

My trouble is Picker is showing correctly on Android but not DatePicker
Can anyone please help me?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.