IOS (Spinner ui) - minimum date stops working if we don't pass maximum date.
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- ios, javascript, react-native
Hướng nghiên cứu
Start by reproducing the two-picker sequence in the supplied React Native sample on iOS with datetimepicker 8.3.0 and spinner display. Compare how the first picker behaves before and after opening the second picker, which supplies both date bounds. Done means the first picker continues enforcing its minimum date when no maximum date is supplied; the issue names no library files or tests to begin from.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Bug report
Summary
If i have 2 instances of DateTimePicker , In first picker i am passing min date and in second both min and max date ,now if i open/close the picker, minimum date stops working for first ( in which i am not passing max date).If i pass some future date in maximum instead of undefined then it works.
Reproducible sample code
import {StyleSheet, Text, View} from 'react-native';
import React, {useState} from 'react';
import RNDateTimePicker from '@react-native-community/datetimepicker';
const App = () => {
const [firstModal, setFirstModal] = useState(false);
const [secondModal, setSecondModal] = useState(false);
return (
<View style={{flex: 1, justifyContent: 'center', alignItems: 'center'}}>
<Text
onPress={() => {
setSecondModal(false);
setFirstModal(true);
}}>
Open First Modal{' '}
</Text>
<Text
onPress={() => {
setFirstModal(false);
setSecondModal(true);
}}>
Open Second Modal{' '}
</Text>
{firstModal && (
<RNDateTimePicker
display="spinner"
onCancel={() => setFirstModal(false)}
onConfirm={() => {
setFirstModal(false);
setSecondModal(true);
}}
onHide={() => setSecondModal(true)}
value={new Date()}
minimumDate={new Date()}
maximumDate={undefined}
/>
)}
{secondModal && (
<RNDateTimePicker
display="spinner"
onCancel={() => setSecondModal(false)}
onConfirm={() => setSecondModal(false)}
style={{backgroundColor: 'red'}}
value={new Date()}
minimumDate={new Date()}
maximumDate={new Date()}
/>
)}
</View>
);
};
export default App;
const styles = StyleSheet.create({});
Steps to reproduce
1.Click on Open First Modal then check if min date is working or not by scrolling..
2.Click on Open Second Modal check min and max date is working..
3. Click on Open First Modal.. minimum date is not working
Describe what you expected to happen:
1.minimum date should be working
Environment info
npx react-native info output:
# paste it here
System:
OS: macOS 15.3.1
CPU: (8) arm64 Apple M2
Memory: 364.28 MB / 16.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 20.13.1
path: /usr/local/bin/node
Yarn:
version: 4.6.0
path: /opt/homebrew/bin/yarn
npm:
version: 9.5.1
path: /usr/local/bin/npm
Watchman:
version: 2024.05.06.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods:
version: 1.16.1
path: /Users/evdt/.gem/bin/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 24.2
- iOS 18.2
- macOS 15.2
- tvOS 18.2
- visionOS 2.2
- watchOS 11.2
Android SDK:
API Levels:
- "28"
- "29"
- "31"
- "32"
- "33"
- "34"
- "35"
Build Tools:
- 30.0.2
- 30.0.3
- 33.0.0
- 33.0.1
- 34.0.0
- 35.0.0
System Images:
- android-33 | Google APIs ARM 64 v8a
- android-33 | Google Play ARM 64 v8a
- android-34 | Google APIs ARM 64 v8a
- android-34 | Google Play ARM 64 v8a
- android-35 | Google Play ARM 64 v8a
Android NDK: Not Found
IDEs:
Android Studio: 2024.2 AI-242.23339.11.2421.12700392
Xcode:
version: 16.2/16C5032a
path: /usr/bin/xcodebuild
Languages:
Java:
version: 17.0.10
path: /Library/Java/JavaVirtualMachines/zulu-17.jdk/Contents/Home/bin/javac
Ruby:
version: 2.7.5
path: /Users/evdt/.rbenv/shims/ruby
npmPackages:
"@react-native-community/cli":
installed: 15.1.3
wanted: latest
react:
installed: 18.3.1
wanted: 18.3.1
react-native:
installed: 0.76.7
wanted: 0.76.7
react-native-macos: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: Not found
newArchEnabled: Not found
iOS:
hermesEnabled: Not found
newArchEnabled: Not found
Time zone name (If the problem you have is related to unexpected time / date. See list in https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
datetimepicker version: 8.3.0
"expo": "~52.0.37",
"react": "18.3.1",
"react-dom": "18.3.1",
"react-native": "0.76.7",
iOS / Android version: 18.2(ios)
- Ngôn ngữ chính
- JavaScript
- Star
- 2.9k
- Fork
- 459
- Merge trung bình
- 4 ngày 16 giờ
- Pull request đã merge (30 ngày)
- 5
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của react-native-datetimepicker/datetimepicker
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 58/100
react-native-datetimepicker/datetimepicker#1070 · 1 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 52/100
-
DateTimePickerAndroid.open() throws "Cannot read property" error on RN 0.78.3 new architectureĐang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
react-native-datetimepicker/datetimepicker#1047 · 6 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 20/100
react-native-datetimepicker/datetimepicker#1046 · 1 bình luận ·
Tất cả issue của react-native-datetimepicker/datetimepicker
Issue tương tự
-
Build produces empty forge.min.js: package.json lists "forge" instead of "node-forge"Có thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Fei2411/DeepSeek-Bot#963 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Miaotofu01/Study-Mate#244 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
test-reliability
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Azure/azure-sdk-for-js#40672 · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
txn2/mcp-data-platform#2492 ·
Maintainer thường phản hồi trong vòng 1 ngày