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.

Can not set selected day's background color in Android

See original GitHub issue

I tried to set the selected day’s background like this:

  <Calendar
        current={this.state.date}
        firstDay={1}
        markedDates={markedDates)}
      />

with markedDates values:

{
  '2017-11-28': {
    selected: true,
    color: '#dd4b39'
  },
  '2017-11-27': {
    selected: true,
    color: '#dd4b39'
  },
  '2017-11-24': {
    selected: true,
    color: '#dd4b39'
  }
}

But it still shows the default color BLUE for selected day. Need help!

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:3
  • Comments:7

github_iconTop GitHub Comments

2reactions
Archakov06commented, Nov 29, 2017

Set this colors in prop theme.

theme={{
    ...
    selected: '#E94D49',
    selectedDayBackgroundColor: '#E94D49',
    selectedDayTextColor: '#fff',
}}
0reactions
Kleinhummelcommented, Jan 27, 2020

How did you solve the problem? I am facing the same issue…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Android Button background color not changing - Stack Overflow
Try use AppCompactButton instead of <Button. use <androidx.appcompat.widget.AppCompatButton. that will do the trick. Update: 01/06/2021.
Read more >
Android Button Background Color Not changing - YouTube
Tech Bholi presents how to solve android studio button background color not changing problem easily. Created by: Bholi AnsariEdited by: ...
Read more >
How to Change the Background Color of a Button in Android ...
In this video, I show you the recommended way to update the background color of a button in Android Studio. We use a...
Read more >
How to set background color of an android activity to yellow ...
This example demonstrates how do I set background color of an android activity to yellow programmatically. Step 1 − Create a new project...
Read more >
Change your Calendar settings - Android - Google Support
Set up your calendar · Open the Google Calendar app Calendar . · Tap Menu Menu and then Settings Settings . · Tap...
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