Comments (12)
Hi @mmazzarolo;
I have sort of a problem about this. I changed colors on my theme on native code but it doesn't change your dialogs. If I use react-native DatePickerAndroid and TimePickerAndroid separately it works perfectly but doesn't change when I use yours.
Here is my style.xml
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<!-- Customize your theme here. -->
<item name="colorAccent">@color/mainRed</item>
</style>
<style name="Dialog.Theme" parent="Theme.AppCompat.Light.Dialog">
<item name="colorAccent">@color/mainRed</item>
</style>
</resources>
Edit: I found out that if I set react-native DatePickerAndroid mode it doesn't work either. If I don't pass a mode prop it works fine.
What do you think can cause this?
Thanks
from react-native-modal-datetime-picker.
Hi there,
to style it on Android you should tweak a bit the native code :)
from react-native-modal-datetime-picker.
I try the below blog for adding datePickerAndroid and it's working fine also provide when a user has multiple input field for date solution.
https://infinitbility.com/how-to-add-datepickerandroid-in-react-native-with-color-changes
from react-native-modal-datetime-picker.
Hey @bennygenel,
I found out that if I set react-native DatePickerAndroid mode it doesn't work either. If I don't pass a mode prop it works fine.
If you're talking about react-native's own DatePickerAndroid
, it is a react-native issue indeed.
Do you mind opening an issue on the react-native official repo?
Feel free to link this issue if needed, I'll leave it open :)
Thank you!
from react-native-modal-datetime-picker.
Hey @mmazzarolo;
Thanks for reopening the issue. I was wondering if it is possible to not provide a mode prop to the DatePickerAndroid if the datePickerModeAndroid prop is omited?
At least this way default DatePickerDialog can be styled correctly.
Thanks again
from react-native-modal-datetime-picker.
Could you submit a PR (making sure that it doesn't break anything)?
I'll gladly merge it, but I'd also like to see the issue reported to the react-native official repo (I can do it by myself when I have some spare time if you can't do it!).
Thanks! 👍
from react-native-modal-datetime-picker.
Android to get the date is not correct bad day
from react-native-modal-datetime-picker.
Closing for inactivity, feel free to post here if you want to discuss this subject further and I'll re-open it! 👨💻
from react-native-modal-datetime-picker.
Passing datePickerModeAndroid={'default'}
fixes the issue.
@mmazzarolo maybe this should be the default value instead of 'calendar'
. What was the reason for using 'calendar'
as the default value for this prop?
from react-native-modal-datetime-picker.
@bsonntag thank you for investigating on the issue.
Honestly, that prop comes from a previous PR, so I can't really answer your question.
Would you mind submitting a PR for fixing it? :)
from react-native-modal-datetime-picker.
@mmazzarolo done 😉
from react-native-modal-datetime-picker.
what should i write on onConfirm function when i have 2 inputfields for date picker? please help me
from react-native-modal-datetime-picker.
Related Issues (20)
- iOS keyboard input for mode="time" breaks the UI HOT 3
- Native module RNDatePicker tried to override RNDatePicker
- Customizing Background and Text Color in Android with Expo HOT 2
- Minimum and maximum time is not working on android but working for ios
- MinuteInterval time return current time in ios , android working fine
- `onHide` callback doesn't return a valid Date
- timeZoneOffsetInMinutes` is deprecated and will be removed in a future release. Use `timeZoneName` instead.
- Datepicker is not visible on iOS HOT 1
- Can't see the text in the picker modal (iOS) HOT 1
- Missing peerDependency on React
- how can only use it as only Month and year picker
- react-native-modal-datetime-picker(^17.1.0) is not showing on iOS 17.3.1 HOT 1
- Exception in HostFunction: Malformed calls from JS: field sizes are different.
- Can't install in react-native 0.74 using NPM I HOT 1
- Dark Mode is not working on Android devices.
- Time Zone Issue HOT 1
- WARN: `defaultProps` will be removed from memo components HOT 3
- isDarkModeEnabled doesn't work on spinner in iOS
- how to add a custom header in Android
- WARN: defaultProps will be removed from memo components
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-modal-datetime-picker.