Forum > Packages and Libraries

tvPlanit - good old days - invalid date allowed

(1/1)

Nicole:
pls try this:

- go to the month view calendar
- click with the arrows year before, year before.... until you get to 1899
- go to the month view 30.12.1899 (and several years before, if you want)
- click on the date
- watch it jump to the year 2023
- day view and week view are fine, they stay in the year 1899.

The thing is not, that I have too many events in the year 1899. The thing is, that a search loop finds that old dates, which cannot exist. This leads to an erratic behavior in my search-results about which I wonder since long.

Why I am posting this: There may be cases, where an invalid date is hidden somewhere / allowed where it should not.

wp:
Fixed in svn version.

If you want to patch you current version yourself, open unit vpmonthviewpainter.pas, find procecure TVpMonthViewPainter.SetMeasurements and replace the line "FDisplayDate := IfThen(RenderDate = 0, Date, RenderDate)" by "FDisplayDate := RenderDate". Since i don't know what the old line was good for, it may be possible that the new version has side-effect, maybe with printing.

Nicole:
Thank you so much, that you care and correct it!
Must I recompile Lazarus if I correct the code?

wp:
It's a change which does not affect designtime and this is independent of the IDE. Probably you need not do anything at all because the IDE should detect the change. If this does not work out, load the laz_visualplanit.lpk and select "More" > "Recompile clean"

Navigation

[0] Message Index

Go to full version