TsPopupCalendar accepts clicks on invalid dates

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #70051
    Alan Montgomery
    Participant

    When you click on an invalid date (or just a day of the week) in the popup this closes the popup as if it had accepted the date. This confuses users as it hasn’t done what they expected.

    The issue appears to be that in TsCalendGrid.WndProc for WM_LBUTTONDOWN it checks if the clicked cell is a valid date before selecting it. However for WM_LBUTTONUP it just unconditionally calls the CalendarClick.
    CalendarClick then can’t check if the click was valid as it can only see the selected date.

    If I use the NextYear button to go to a year after the end date and click then the popup doesn’t close.
    NextYear has selected an invalid date so now CalendarClick can reject it.

    #70061
    Support
    Keymaster

    Can you show an Exe-file with such issue, please?

    #70066
    Alan Montgomery
    Participant

    The attached exe shows 3 issues.
    a) If you click on an invalid date the popup closes and “accepts” a different date to the one clicked.
    Run the exe and click to show the popup.
    Go back to May
    Click on the 4th of may.
    The popup closes and 17 May is shown as having been selected.

    b) You can’t tell that dates before 17th May or after 8 June are invalid.
    Run the exe and click to show the popup.

    c) If you click on next month when in the month of the max date it animates “to” the same month, and may change the selected Day of the Month.
    It took me a while to realise it wasn’t changing. Less technical users may struggle.
    previous month has the same problem.
    Note: Next / prev year doesn’t limit the new date to be in the min/max.
    Run the exe and click to show the popup.
    Click next month.

    There is an option With fixes when checked
    a) If the LMouseButtonDown didn’t select the cell then the LMouseButtonUp does not call CalenderClick
    b) It blends with GetGlobalColour instead of Canvas.Bruch.Color
    c) If ChangeMonth doesn’t change the month it doesn’t do the if/else block

    #70067
    Alan Montgomery
    Participant

    Delphi appears to be struggling to produce an exe that zips to less than 4MB

    #70068
    Alan Montgomery
    Participant

    I have a version without the internal skin – it needs Material Dark in C:\AlphaSkins\Skins
    It also has runtime packages turned on.

    Attachments:
    You must be logged in to view attached files.
    #70070
    Alan Montgomery
    Participant

    I have updated to 16.10 and this fixes a and c. Issue b I have raised in another item so I will update it.

    #70079
    Support
    Keymaster

    Hello! Some improvements were added in the v16.11, you can try it already.

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.