TsMonthCalendar always highlights one day

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #33247
    HeDiBo
    Participant

    Because today is May 30, the month calendar also highlights June 30, July 30, etc.

    This is extremely confusing, because these dates have nothing special.

    [attachment=8778:Monthcal.jpg]

    Can I reset this “feature”? a1.gif

    #40440
    Support
    Keymaster

    Sorry, I'm not sure what you mean.

    Current day of month is higlighted as red in all monthes?

    #39401
    Stephane Senecal
    Participant

    I think he confuses selected date and today's date

    Stephane Senecal
    CIS Group
    Delphi programmer since 2001

    #40444
    HeDiBo
    Participant
    'Support' wrote:

    Sorry, I'm not sure what you mean.

    Current day of month is higlighted as red in all monthes?

    Apparantly I'm confused because what is shown is a selected day (thank you Stephane Senecal). However, this selection can only be activated by pressing the Enter key. And is not of much use. So, I would like a possibility to not show a selected day when the calendar is walked by months or years. Because showing one is quite arbitrary and very confusing.

    #58019
    HeDiBo
    Participant

    To disable showing the selection, first of all, the property ShowSelectAlways of the popup month calendar should be settable in TsDateEdit too (a very simple change).

    However, in a TsMonthCalendar I could not make the property ShowSelectAlways to work. Setting it to False did not change the wanted behavior of the calendar. All it did was not show a selection if no cell was clicked before scrolling a month or a year. After a cell was clicked, it was impossible to make the selection box disappear.

    The problem is fundamental. You consider a selection to be made on a day of a month. But normally a user would select only one specific date. When starting to scroll, that selection should not travel to the newly shown month. Scrolling is just a way of looking at another place. It is not a way to travel there too. The selection should stay on the date clicked, not on a new, more or less random date shown.

    So, I propose a new property: TravellingSelection that defaults to True (for compatibility). If it's False, a selection stays on the cell clicked, no matter where the user scrolls to. It should stay there until another cell is clicked. The Enter key should not return the selected date, if that month is not shown. If it would, the user would be in trouble if he/she would not notice this (to circumvent that pressing Enter in September could result in a date in Februari).

    The new property TravellingSelection should be exported to the TsDateEdit control too.

    #58040
    HeDiBo
    Participant

    The property TravellingSelection works very well. Thank you a3.gif

    There's one aspect that does not work as requested: if the calendar is scrolled to another month/year with TavellingSelection = False, pressing the Enter key still returns the (now invisible) selected date. The Enter key should do nothing in this case, to prevent entering a date that was not meant to be selected.

    The property DimUnacceptedCells works fine, but the default should probably be False, because that's the way it worked previously.

    When scrolling by month/year the calendar flickers. First it is painted undimmed and immediately after that it is repainted with dimmed cells. This shows as a slight flicker.

    #58043
    HeDiBo
    Participant
    'HeDiBo' wrote:

    When scrolling by month/year the calendar flickers. First it is painted undimmed and immediately after that it is repainted with dimmed cells. This shows as a slight flicker.

    This was a misinterpretation of my part. You can forget about this.

    The issues that the Enter key may return an unexpected date and that the property DimUnacceptedCells should default to False are still open.

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