question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

White text when calling view.setDaysDisabled(true);

See original GitHub issue

Hi! 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:closed
  • Created 7 years ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
quentin41500commented, May 20, 2016

@sofiahellofresh I just found out, app:mcv_showOtherDates="none" hide the days that are disabled. Remove it and you should expect what you want.

0reactions
markcadagcommented, Oct 23, 2018

app:mcv_showOtherDates="none" hides previous dates from setMinimumDate using app:mcv_showOtherDates="all" solved my issue.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found