White text when calling view.setDaysDisabled(true);
See original GitHub issueHi! I’m trying to disabled some dates in the calendar by using a custom decorator that calls view.setDaysDisabled(true); I don’t want to change the style of the text, I just want them to be not selectable. This is what I’m using:
<!-- style.xml -->
<style name="CustomDayTextAppearance"
parent="TextAppearance.MaterialCalendarWidget.Date">
<item name="android:textColor">@color/calendar_date_color_selector</item>
<item name="android:textSize">@dimen/calendar_text_size</item>
</style>
<!-- color/calendar_date_color_selector.xml -->
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android"
android:enterFadeDuration="@android:integer/config_shortAnimTime"
android:exitFadeDuration="@android:integer/config_shortAnimTime">
<item android:color="@color/white" android:state_checked="true"/>
<item android:color="@color/white" android:state_pressed="true"/>
<item android:color="@android:color/black" android:state_enabled="false"/>
<item android:color="@android:color/black"/>
</selector>
When the calendar is loaded I see all of the dates that I want to disable in white. Am I doing something wrong?
Thanks in advance!
Issue Analytics
- State:
- Created 7 years ago
- Comments:9 (6 by maintainers)
Top Results From Across the Web
Apply text color on disabled=true textbox - Stack Overflow
I would like to know if it's possible to force a CSS Color on a "disabled=true" textbox? By default, this attribute is removing...
Read more >Adjust the screen brightness and color on iPhone
Go to Settings > Accessibility. Tap Display & Text Size, then turn on Auto-Brightness. Turn Dark Mode on or off.
Read more >ARIA: button role - Accessibility - MDN Web Docs - Mozilla
A menu button is a button that controls a menu and has an aria-haspopup property attribute set to either menu or true ....
Read more >How do I disable the annoying circle/dot on my screen?
It's stays on after you finished screencasting.If you haven't already unlocked developer options go to settings > about phone and tap 7 times...
Read more >Buttons - Bootstrap
Disabled buttons should include the aria-disabled="true" attribute to indicate the state of the element to assistive technologies. Primary link Link. Copy. <a ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@sofiahellofresh I just found out,
app:mcv_showOtherDates="none"
hide the days that are disabled. Remove it and you should expect what you want.app:mcv_showOtherDates="none"
hides previous dates from setMinimumDate usingapp:mcv_showOtherDates="all"
solved my issue.