Skip to content
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

setTextColorForDate and setBackgroundDrawableForDate methods don't seem to work #461

Open
anirudhmaddy opened this issue Jun 6, 2017 · 2 comments

Comments

@anirudhmaddy
Copy link

anirudhmaddy commented Jun 6, 2017

Below is my code:

   Date netDate = (new Date(timeStamp));
   int colorCode = Color.parseColor("#33b5e5");
   ColorDrawable green = new ColorDrawable(Color.GREEN);

   caldroidFragment.setTextColorForDate(R.color.colorPrimary,netDate);
   caldroidFragment.setBackgroundDrawableForDate(green,netDate);
   caldroidFragment.refreshView();
@indraAsLesmana
Copy link

indraAsLesmana commented Dec 19, 2017

same to me, did u solve the problem now @anirudhmaddy ?

@Silverlink34
Copy link

Silverlink34 commented Jan 8, 2019

I was having this problem as well. I then found out that my dateString that I was parsing with SimpleDateFormat was actually not the right format.
Example:
String dateString = 2019-01-08 //I had thought this was actually 01-08-2019
SimpleDateFormat sdf = new SimpleDateFormat("MM-dd-yyyy")
Date date = sdf.parse(dateString);
After correcting the date format string to yyyy-MM-dd the calendar set the colors properly!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants