Hello fellow Devs! I am trying to change the defau...
# compose
s
Hello fellow Devs! I am trying to change the default TextStyle for the days and weekdays in the Material 3 DatePicker component. However I stumbled on an issue where the material devs state that this wasn't allowed on purpose, so they suggested a workaround by wrapping the DatePicker in the MaterialTheme compositionLocal class and changing the TextStyle. I did that and it worked, but it introduced another problem, and the problem is that the colors for the selectedDayContent and selectedYearContent do not change. They remain the same when the states have changed like when the dates/year are selected or when they're disabled. They do not reflect, every other thing works like the containers but the text has a problem.
This is my attempt to the solution which worked
But it then introduced another problem where this two fields basically do not work. The colors I set are light colors, but they do not change but rather remain the same color(which I assume is the color of the TextStyle that I passed)
From the screenshot, you can see that my selected date is basically not visible because the colour does not change but remains the same. And even past dates are supposed to be disabled, starting from the 9th(I took this screenshot yesterday) but they're not VISUALLY. The dates disabled functionality is working but not the colors
btw I am using a custom theme. Does this have anything to do with it?
Okay I found the fix to this. Apparently passing any TextStyle where you pass a color to it causes this issue. The typography I passed to the DatePicker through the MaterialTheme class had a color value, so removing that fixed the problem