summaryrefslogtreecommitdiff
path: root/src/gui/fpg_popupcalendar.pas
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graeme@mastermaths.co.za>2010-06-28 12:17:55 +0200
committerGraeme Geldenhuys <graeme@mastermaths.co.za>2010-06-28 12:17:55 +0200
commit19899188773b0caeff4fe93f6b944fc928512001 (patch)
tree277eb06e81444d69aea227caaf7cb7a2c5e53226 /src/gui/fpg_popupcalendar.pas
parentaf53b13cdb65638d5bed06295989f59d87c8e001 (diff)
downloadfpGUI-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/gui/fpg_popupcalendar.pas')
-rw-r--r--src/gui/fpg_popupcalendar.pas19
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;