Ignore:
Timestamp:
May 7, 2015, 12:34:29 PM (9 years ago)
Author:
healthsevak
Message:

Updating the working copy to CPRS version 28

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cprs/trunk/CPRS-Lib/ORDtTm.pas

    r829 r1679  
    9999    FCaption: TStaticText;
    100100    FBlackColorMode: boolean;
     101    FOnDateDialogClosed : TNotifyEvent;
    101102    procedure ButtonClick(Sender: TObject);
    102103    function GetFMDateTime: TFMDateTime;
     
    115116    procedure KeyDown(var Key: Word; Shift: TShiftState); override;
    116117    property DateButton: TORDateButton read FButton;
     118    procedure SetEnabled(Value: Boolean); override; //wat v28  when disabling TORDateBox, button still appears active, this addresses that
    117119  public
    118120    constructor Create(AOwner: TComponent); override;
     
    130132    property RequireTime: Boolean     read FRequireTime write SetRequireTime;
    131133    property Caption: string read GetCaption write SetCaption;
     134    property OnDateDialogClosed: TNotifyEvent read FOnDateDialogClosed write FOnDateDialogClosed;
    132135  end;
    133136
     
    646649  end;
    647650  DateDialog.Free;
     651  if Assigned(OnDateDialogClosed) then OnDateDialogClosed(Self);
    648652  if Visible and Enabled then //Some events may hide the component
    649653    SetFocus;
     
    740744  if Length(Text) > 0 then
    741745  begin
     746   {
     747!!!!!! THIS HAS BEEN REMOVED AS IT CAUSED PROBLEMS WITH REMINDER DIALOGS - VHAISPBELLC !!!!!!
     748    //We need to make sure that there is a date entered before parse
     749    if FRequireTime and ((Pos('@', Text) = 0) or (Length(Piece(Text, '@', 1)) = 0)) then
     750     ErrMsg := 'Date Required';
     751    }
    742752    FFMDateTime := ServerParseFMDate(Text);
    743753    if FFMDateTime <= 0 then Errmsg := 'Invalid Date/Time';
     
    777787    end;
    778788    FCaption.Caption := Value;
     789end;
     790
     791procedure TORDateBox.SetEnabled(Value: Boolean);
     792begin
     793  FButton.Enabled := Value;
     794  inherited;
    779795end;
    780796
Note: See TracChangeset for help on using the changeset viewer.