2

I have seen this post about how to highlight the cell but I cant find a DRAW in the source for FMX.TCalendar:

is there a way to highlight cell/s in a TCalendar?

What I am wanting to do is to be able to change all backgrounds to grey where date < Today(), then also have an option where I can do something like Function DisableCalendarDate(SOMEDATE); and it would change that date to a grey background.

I can't find any way to do this. Maybe there is no way?

Remy Lebeau
  • 555,201
  • 31
  • 458
  • 770
Glen Morse
  • 2,437
  • 8
  • 51
  • 102
  • The post you linked to is for VCL, not for FMX – Remy Lebeau Aug 25 '23 at 21:06
  • 2
    No easy customization like there is for the VCL calendar. Modifying the FMX one seems like an approach some have taken. Take a look at : https://stackoverflow.com/questions/33770484/delphi-fmx-tcalendar-disable-weekends Another approach is mentioned in : https://stackoverflow.com/questions/62744435/is-there-a-way-to-select-highlight-a-date-range-series-using-delphi-10-3-fmx-tca?rq=2 – Brian Aug 25 '23 at 22:02
  • @Brian I agree style seems to be the way to go, but having never done this, nor do I know if you can apply different styles for different dates and have them show up together is very confusing. I will look into more the styles. but as of now its not clicking. – Glen Morse Aug 28 '23 at 13:30

1 Answers1

2

the second link indicated by Brian is certainly the best approach. (I learn much from this !) Just download Yaros Lavbrovin's zip. Extract the 2 units named FMX.Calendarxxxxxx.pas to your project directory add in the uses list these 2 units

SergeGirard
  • 261
  • 1
  • 2
  • 8