TDateEdit - Calendar Popup will accept illegal dates resulting in Exception
- Lazarus/FPC Version: <Lazarus 2.2.2 (rev lazarus_2_2_2) FPC 3.2.2 x86_64-win64-win32/win64>
- Operating System: <Windows 11>
- CPU / Bitness: <64>
TDateEdit control. Calendar Popup allows selection of illegal dates causing exceptions EXCEPTION: EInvalidDate: 1/1/1601. Must be between 9/24/1752 and 12/31/9999.
What did you expect
The calendar should not allow the user to select a date outside the range of TDateTime. Alternatly a date range could be implemented specified by the application.
Steps to reproduce
Put a TDateEdit control on a form. User clicks on button for Calendar Popup. The calendar popup will accept dates as far back as 1/1/1601 User selects 1/1/1601 (or any other date before 9/24/1752) Control populates the text field with 1/1/1601 User realizes this is a really stupid date and clicks on the button again to fix it **EXCEPTION: EInvalidDate: 1/1/1601. Must be between 9/24/1752 and 12/31/9999. **