diff options
author | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2010-06-28 12:17:55 +0200 |
---|---|---|
committer | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2010-06-28 12:17:55 +0200 |
commit | 19899188773b0caeff4fe93f6b944fc928512001 (patch) | |
tree | 277eb06e81444d69aea227caaf7cb7a2c5e53226 /src | |
parent | af53b13cdb65638d5bed06295989f59d87c8e001 (diff) | |
download | fpGUI-19899188773b0caeff4fe93f6b944fc928512001.tar.xz |
Checkbox Calender: Bug fix in SetDateValue
* The validation that was done, was done with the internal date
value, instead of the new date value passed in. Oops!
* Removed some old commented code.
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/fpg_popupcalendar.pas | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/src/gui/fpg_popupcalendar.pas b/src/gui/fpg_popupcalendar.pas index 85382adf..d9b240b7 100644 --- a/src/gui/fpg_popupcalendar.pas +++ b/src/gui/fpg_popupcalendar.pas @@ -448,14 +448,14 @@ begin if FDate = AValue then Exit; //==> - if (trunc(FDate) >= trunc(FMinDate)) then + if (trunc(AValue) >= trunc(FMinDate)) then {$IFDEF DEBUG} writeln('Passed min test') {$ENDIF} else exit; - if (FDate <= FMaxDate) then + if (trunc(AValue) <= trunc(FMaxDate)) then {$IFDEF DEBUG} writeln('Passed max test') {$ENDIF} @@ -796,9 +796,6 @@ begin Name := 'fpgPopupCalendar'; SetPosition(370, 182, 233, 142); Hint := ''; - // WindowTitle := 'fpgPopupCalendar'; - // Sizeable := False; - // WindowPosition := wpUser; edtYear := TfpgEdit.Create(self); with edtYear do @@ -936,17 +933,7 @@ begin {@VFD_BODY_END: fpgPopupCalendar} {%endregion} -{ - // Setup localization - // UI Designer doesn't support resource strings yet! - grdName1.ColumnTitle[0] := rsShortSun; - grdName1.ColumnTitle[1] := rsShortMon; - grdName1.ColumnTitle[2] := rsShortTue; - grdName1.ColumnTitle[3] := rsShortWed; - grdName1.ColumnTitle[4] := rsShortThu; - grdName1.ColumnTitle[5] := rsShortFri; - grdName1.ColumnTitle[6] := rsShortSat; -} + btnToday.Text := rsToday; end; |