xgfe / react-native-datepicker

react native datePicker component for both Android and IOS, useing DatePikcerAndroid, TimePickerAndroid and DatePickerIOS
MIT License
2.12k stars 726 forks source link

Is there any way to set minTime in Android #346

Open Jeijie opened 5 years ago

Jeijie commented 5 years ago

Issue

Setting minDate don't work for restrict minTime in android. I still can choose earlier time than min Date

Expected Behavior

can't choose earlier time than min Date.

Code

<DatePicker style={styles.datepicker} date={this.state.orderDate} time={this.state.orderTime} mode="datetime" showIcon={false} format="YYYY-MM-DD HH:mm" androidMode="spinner" placeholder="2015-06" locale="zh_cn" minDate={new Date()} confirmBtnText="确定" cancelBtnText="取消" ... />

Environment

React Native Environment Info: System: OS: macOS High Sierra 10.13.6 CPU: (4) x64 Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz Memory: 75.96 MB / 8.00 GB Shell: 3.2.57 - /bin/bash Binaries: Node: 8.11.3 - /usr/local/bin/node Yarn: 1.9.4 - /usr/local/bin/yarn npm: 6.3.0 - /usr/local/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman SDKs: iOS SDK: Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1 Android SDK: API Levels: 23, 26, 28 Build Tools: 23.0.1, 23.0.3, 26.0.3, 27.0.3, 28.0.1, 28.0.3 System Images: a...-tv | Android TV ARM EABI v7a System..., a... | Android TV Intel x86 Atom Syst..., a...ear | Android Wear ARM EABI v7a Syst..., a...ndroid-wear | Android Wear Intel x86 Atom Sy..., a... | Intel x86 Atom_64 IDEs: Android Studio: 3.1 AI-173.4720617 Xcode: 10.1/10B61 - /usr/bin/xcodebuild npmPackages: react: 16.8.3 => 16.8.3 react-native: 0.59.5 => 0.59.5 npmGlobalPackages: react-native-cli: 2.0.1 react-native-git-upgrade: 0.2.7

borm commented 5 years ago

up

AppleCkp commented 4 years ago

Hi, any update for this issue?