JFXtras/jfxtras-labs — pull request #86 by gurkok (2013-12-24 10:07:56+00:00)
Title: Styling for today

When the CalendarPicker is constructed, the ControlSkin adds styling for today. If we call CalendarPicker.setCalendar for the same month, then the skin gets refreshed and it re-adds the styling 'today'. So, the day gets duplicate 'today's. Now, if we change the calendar (e.g. to one month before) then only one occurrence of 'today' is removed so the styling remains. We don't have this problem in normal days because skin always removes the styling first and re-adds it. This pull request is similar to that. We now always remove 'today' first and then re-add it if necessary. This way, duplicate styling would be prevented. I think the style 'highlight' also suffers from this problem so the same solution can be applied to that as well. The change does not impose any performance degradation as far as I can see.