Bug in TMSFNCCalendar

Bug in TMSFNCCalendar:

when a calendar is set to a month with fewer days then current month and the current day is higher, a dateencode error occurs.

I placed a calendar on a form (vcl) and set the month to "june 2022". Everything goes fine until the application is executed on a day that is higher then the last day in the month set at design time (ie 31-03-2022) .

Today (31-03) I also noticed that trying to set the month to any other month with less then 31 days at design time, also gives a date encode error. In the screenshot, I first set the month to jan 2022 without any problem. Then trying to set the month to 2 (february), the date encode error occurs.

Hi,

That is an expected behavior. Going by your example, changing the Month property alone, you are telling the component to show the date 31/02/2022 which does not exists.

We'll look to expose the Day and Date properties too to a published level so you'll have more control over this.