mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-09 15:48:03 +02:00
TCalendar and TDateEdit: improve IsLimited function. Now it only returns true if MaxDate actually is at least one day > MinDate (it would return True if MaxDate-MinDate was larger than 0.1 msec)
This commit is contained in:
parent
d0843ab78b
commit
6cd311dd36
@ -346,7 +346,7 @@ end;
|
||||
|
||||
function TCustomCalendar.IsLimited: Boolean;
|
||||
begin
|
||||
Result := (CompareValue(FMinDate, FMaxDate, DTEpsilon) = LessThanValue);
|
||||
Result := (Trunc(FMaxDate)-Trunc(FMinDate) > 0);
|
||||
end;
|
||||
|
||||
procedure TCustomCalendar.ApplyLimits;
|
||||
|
@ -2018,7 +2018,7 @@ end;
|
||||
|
||||
function TDateEdit.IsLimited: Boolean;
|
||||
begin
|
||||
Result := (CompareValue(FMinDate, FMaxDate, DTEpsilon) = LessThanValue);
|
||||
Result := (Trunc(FMaxDate)-Trunc(FMinDate) > 0);
|
||||
end;
|
||||
|
||||
function TDateEdit.GetMaxDateStored: Boolean;
|
||||
|
Loading…
Reference in New Issue
Block a user