TwwCalendarEdit changing value when user doesn't & failing to notify binding


1 comment

  • kyle

    I found a workaround to default to today's date when Text = '' and dataset not put into edit problem.

    In TwwCalendarEdit.DropDown, comment out the following lines (3606 - 3610):

    //      if DateTime = 0.0 then
    //      begin
    //        if not IsTimeOnlyField then
    //          DateTime := System.SysUtils.Date;
    //      end;

    Add the following code just before FListPicker.Show:

          if DateTime = 0.0 then
            if not IsTimeOnlyField then
              FListPicker.Date := System.SysUtils.Date;


    This will force the user to select a date & cause the dataset to go into edit.

    Now, how to stop navigating the calendar changing the edit value & reserve such an event for when the user selects a value. Hmm... a little tougher since it's contra-Delphi's default behavior for this control.

    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk