Times-Square and today's date

1.2k Views Asked by At

Quick question to users of Square's Times-Square calendar widget. Is there any way NOT to have it highlight's today's date?

Currently, it highlights today's date with a dark grey and I would like to disable that. I have looked at the GitHub code and could not figure out how to do it.

2

There are 2 best solutions below

0
On

To change the background colour of todays date you need to override calendar_bg_selector.xml in your drawable folder and change:

<item app:tsquare_state_today="true"> <color android:color="@color/new_bg_colour"/> </item>

Similarly to change the text colour of todays date override calendar_text_selector.xml in your res/color package and change:

<item app:tsquare_state_today="true" android:color="@color/new_text_colour"/>

Original files at gitHub:

https://github.com/square/android-times-square/blob/master/library/src/main/res/color/calendar_text_selector.xml

https://github.com/square/android-times-square/blob/master/library/src/main/res/drawable/calendar_bg_selector.xml

0
On
calendar.init(today, maxDate.getTime());//.withSelectedDate(today); remove this