-
-
Notifications
You must be signed in to change notification settings - Fork 420
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Styling of the material datepicker on android #960
Comments
I have tried and found the issue in the code is in these datetimepicker/android/src/main/java/com/reactcommunity/rndatetimepicker/RNMaterialDatePicker.kt Lines 101 to 105 in 4865e33
By commenting out these lines you can then apply a theme by adding the following to
Here is all the attributes you can apply for reference I'm still trying to figure out a way in kotlin to grab the theme overlay if it exists, and if not apply the default material theme, but no luck so far. I'll submit a PR if I manage to figure it out, but the best solution may be to expose an attribute in the package and then look for that attribute in the code. |
Yes, this was an issue I struggled with when I was adding these new components. I opted with letting the users of the library apply color/theme styles across the application as a whole. For example: <item name="colorPrimary">#D81B60</item> will update the calendar with the new color, even though, like you pointed out, we're setting the theme of the date picker to The only downside (and I wouldn't even consider it a downside), is that when you change the |
If you add |
@sidorchukandrew You are correct that there are some system wide values you can set to change some of the styling of the calendar, but it will affect all material components of the app. The documentation I linked shows what the default values are for some of the styling properties and what you can tweak to change it. The PR I have created and linked in this issue would fix this and allow you to set an overlay style for the calendar. The time picker luckily does not override the theme in the code, and can be styled independently from the other components. |
Question
Has anyone been able to change the styling of the datepicker when using the new material version?
The config plugin deosn't work anymore, the material version uses different style properties.
I have been playing around with creating my own config plugin but I haven't found any style properties which have any effect.
The text was updated successfully, but these errors were encountered: