mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-10 22:38:57 +02:00
Merge branch calendar-minmaxdate into main.
This commit is contained in:
commit
e97e733747
123
lcl/calendar.pp
123
lcl/calendar.pp
@ -30,7 +30,8 @@ interface
|
|||||||
|
|
||||||
uses
|
uses
|
||||||
{$IFDEF VerboseCalenderSetDate}LCLProc,{$ENDIF}
|
{$IFDEF VerboseCalenderSetDate}LCLProc,{$ENDIF}
|
||||||
Types, SysUtils, Classes, LCLType, LCLStrConsts, lMessages, Controls, LResources;
|
Types, SysUtils, Classes, LCLType, LCLStrConsts, lMessages, Controls, LResources,
|
||||||
|
Math;
|
||||||
|
|
||||||
type
|
type
|
||||||
TDisplaySetting = (
|
TDisplaySetting = (
|
||||||
@ -80,20 +81,31 @@ type
|
|||||||
FDate: TDateTime; // last valid date
|
FDate: TDateTime; // last valid date
|
||||||
FDisplaySettings : TDisplaySettings;
|
FDisplaySettings : TDisplaySettings;
|
||||||
FFirstDayOfWeek: TCalDayOfWeek;
|
FFirstDayOfWeek: TCalDayOfWeek;
|
||||||
|
FMinDate: TDateTime;
|
||||||
|
FMaxDate: TDateTime;
|
||||||
FOnChange: TNotifyEvent;
|
FOnChange: TNotifyEvent;
|
||||||
FDayChanged: TNotifyEvent;
|
FDayChanged: TNotifyEvent;
|
||||||
FMonthChanged: TNotifyEvent;
|
FMonthChanged: TNotifyEvent;
|
||||||
FYearChanged: TNotifyEvent;
|
FYearChanged: TNotifyEvent;
|
||||||
FPropsChanged: boolean;
|
FPropsChanged: Boolean;
|
||||||
|
FLimitsChanged: Boolean;
|
||||||
|
procedure CheckRange(ADate, AMinDate, AMaxDate: TDateTime);
|
||||||
function GetDateTime: TDateTime;
|
function GetDateTime: TDateTime;
|
||||||
|
function GetMaxDateStored: Boolean;
|
||||||
|
function GetMixDateStored: Boolean;
|
||||||
procedure SetDateTime(const AValue: TDateTime);
|
procedure SetDateTime(const AValue: TDateTime);
|
||||||
procedure GetProps;
|
procedure GetProps;
|
||||||
|
procedure SetMaxDate(AValue: TDateTime);
|
||||||
|
procedure SetMinDate(AValue: TDateTime);
|
||||||
procedure SetProps;
|
procedure SetProps;
|
||||||
function GetDisplaySettings: TDisplaySettings;
|
function GetDisplaySettings: TDisplaySettings;
|
||||||
procedure SetDisplaySettings(const AValue: TDisplaySettings);
|
procedure SetDisplaySettings(const AValue: TDisplaySettings);
|
||||||
function GetDate: String;
|
function GetDate: String;
|
||||||
procedure SetDate(const AValue: String);
|
procedure SetDate(const AValue: String);
|
||||||
procedure SetFirstDayOfWeek(const AValue: TCalDayOfWeek);
|
procedure SetFirstDayOfWeek(const AValue: TCalDayOfWeek);
|
||||||
|
function IsLimited: Boolean;
|
||||||
|
procedure ApplyLimits;
|
||||||
|
procedure RemoveLimits;
|
||||||
protected
|
protected
|
||||||
class procedure WSRegisterClass; override;
|
class procedure WSRegisterClass; override;
|
||||||
procedure LMChanged(var Message: TLMessage); message LM_CHANGED;
|
procedure LMChanged(var Message: TLMessage); message LM_CHANGED;
|
||||||
@ -113,6 +125,8 @@ type
|
|||||||
property DisplaySettings: TDisplaySettings read GetDisplaySettings
|
property DisplaySettings: TDisplaySettings read GetDisplaySettings
|
||||||
write SetDisplaySettings default DefaultDisplaySettings;
|
write SetDisplaySettings default DefaultDisplaySettings;
|
||||||
property FirstDayOfWeek: TCalDayOfWeek read FFirstDayOfWeek write SetFirstDayOfWeek default dowDefault;
|
property FirstDayOfWeek: TCalDayOfWeek read FFirstDayOfWeek write SetFirstDayOfWeek default dowDefault;
|
||||||
|
property MaxDate: TDateTime read FMaxDate write SetMaxDate stored GetMaxDateStored;
|
||||||
|
property MinDate: TDateTime read FMinDate write SetMinDate stored GetMixDateStored;
|
||||||
property OnChange: TNotifyEvent read FOnChange write FOnChange;
|
property OnChange: TNotifyEvent read FOnChange write FOnChange;
|
||||||
property OnDayChanged: TNotifyEvent read FDayChanged write FDayChanged;
|
property OnDayChanged: TNotifyEvent read FDayChanged write FDayChanged;
|
||||||
property OnMonthChanged: TNotifyEvent read FMonthChanged write FMonthChanged;
|
property OnMonthChanged: TNotifyEvent read FMonthChanged write FMonthChanged;
|
||||||
@ -181,6 +195,8 @@ end;
|
|||||||
{ TCustomCalendar }
|
{ TCustomCalendar }
|
||||||
|
|
||||||
constructor TCustomCalendar.Create(AOwner: TComponent);
|
constructor TCustomCalendar.Create(AOwner: TComponent);
|
||||||
|
var
|
||||||
|
WSMinDate, WSMaxDate: TDateTime;
|
||||||
begin
|
begin
|
||||||
inherited Create(AOwner);
|
inherited Create(AOwner);
|
||||||
fCompStyle := csCalendar;
|
fCompStyle := csCalendar;
|
||||||
@ -188,6 +204,9 @@ begin
|
|||||||
FDisplaySettings := DefaultDisplaySettings;
|
FDisplaySettings := DefaultDisplaySettings;
|
||||||
FFirstDayOfWeek := dowDefault;
|
FFirstDayOfWeek := dowDefault;
|
||||||
ControlStyle:=ControlStyle-[csTripleClicks,csQuadClicks,csAcceptsControls,csCaptureMouse];
|
ControlStyle:=ControlStyle-[csTripleClicks,csQuadClicks,csAcceptsControls,csCaptureMouse];
|
||||||
|
FMinDate := 0.0;
|
||||||
|
FMaxDate := 0.0;
|
||||||
|
FLimitsChanged := False;
|
||||||
DateTime := Now;
|
DateTime := Now;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -265,12 +284,35 @@ begin
|
|||||||
SetProps;
|
SetProps;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TCustomCalendar.CheckRange(ADate, AMinDate, AMaxDate: TDateTime);
|
||||||
|
begin
|
||||||
|
//otherwise you get a message like "Invalid Date: 31-12-9999. Must be between 1-1-0001 and 31-12-9999"
|
||||||
|
if (ADate < SysUtils.MinDateTime) then
|
||||||
|
raise EInvalidDate.CreateFmt(rsDateTooSmall, [DateToStr(SysUtils.MinDateTime)]);
|
||||||
|
if (ADate > SysUtils.MaxDateTime) then
|
||||||
|
raise EInvalidDate.CreateFmt(rsDateTooLarge, [DateToStr(SysUtils.MaxDateTime)]);
|
||||||
|
|
||||||
|
if (ADate < AMinDate) or (ADate > AMaxDate) then
|
||||||
|
raise EInvalidDate.CreateFmt(rsInvalidDateRangeHint, [DateToStr(ADate),
|
||||||
|
DateToStr(AMinDate), DateToStr(AMaxDate)]);
|
||||||
|
end;
|
||||||
|
|
||||||
function TCustomCalendar.GetDateTime: TDateTime;
|
function TCustomCalendar.GetDateTime: TDateTime;
|
||||||
begin
|
begin
|
||||||
GetProps;
|
GetProps;
|
||||||
Result:=FDate;
|
Result:=FDate;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TCustomCalendar.GetMaxDateStored: Boolean;
|
||||||
|
begin
|
||||||
|
Result := not SameValue(FMaxDate, Double(0.0), 1E-9);
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TCustomCalendar.GetMixDateStored: Boolean;
|
||||||
|
begin
|
||||||
|
Result := not SameValue(FMinDate, Double(0.0), 1E-9);
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TCustomCalendar.SetDateTime(const AValue: TDateTime);
|
procedure TCustomCalendar.SetDateTime(const AValue: TDateTime);
|
||||||
{$IFDEF WINDOWS}
|
{$IFDEF WINDOWS}
|
||||||
var
|
var
|
||||||
@ -278,13 +320,10 @@ var
|
|||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
begin
|
begin
|
||||||
if AValue=FDate then exit;
|
if AValue=FDate then exit;
|
||||||
{$IFDEF WINDOWS} // TODO: move this test to the win32 interface?
|
if IsLimited then
|
||||||
CalendarMinDate:=-53787;// 14 sep 1752, start of Gregorian calendar in England
|
CheckRange(AValue, FMinDate, FMaxDate)
|
||||||
CalendarMaxDate:=trunc(MaxDateTime);
|
else
|
||||||
if not ((AValue>=CalendarMinDate)and(AValue<=CalendarMaxDate)) then
|
CheckRange(AValue, SysUtils.MinDateTime, SysUtils.MaxDateTime);
|
||||||
raise EInvalidDate.CreateFmt(rsInvalidDateRangeHint, [DateToStr(AValue),
|
|
||||||
DateToStr(CalendarMinDate), DateToStr(CalendarMaxDate)]);
|
|
||||||
{$ENDIF}
|
|
||||||
FDate:=AValue;
|
FDate:=AValue;
|
||||||
FDateAsString:=FormatDateTime(DefaultFormatSettings.ShortDateFormat,FDate);
|
FDateAsString:=FormatDateTime(DefaultFormatSettings.ShortDateFormat,FDate);
|
||||||
{$IFDEF VerboseCalenderSetDate}
|
{$IFDEF VerboseCalenderSetDate}
|
||||||
@ -300,6 +339,27 @@ begin
|
|||||||
SetProps;
|
SetProps;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TCustomCalendar.IsLimited: Boolean;
|
||||||
|
begin
|
||||||
|
Result := (CompareValue(FMinDate, FMaxDate, 1E-9) = LessThanValue);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TCustomCalendar.ApplyLimits;
|
||||||
|
begin
|
||||||
|
if (GetDateTime > FMaxDate) then
|
||||||
|
SetDateTime(FMaxDate)
|
||||||
|
else if (GetDateTime < FMinDate) then
|
||||||
|
SetDateTime(FMinDate);
|
||||||
|
FLimitsChanged := True;
|
||||||
|
SetProps;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TCustomCalendar.RemoveLimits;
|
||||||
|
begin
|
||||||
|
FLimitsChanged := True;
|
||||||
|
SetProps;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TCustomCalendar.GetProps;
|
procedure TCustomCalendar.GetProps;
|
||||||
begin
|
begin
|
||||||
if HandleAllocated and ([csLoading,csDestroying]*ComponentState=[]) then
|
if HandleAllocated and ([csLoading,csDestroying]*ComponentState=[]) then
|
||||||
@ -312,6 +372,42 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TCustomCalendar.SetMaxDate(AValue: TDateTime);
|
||||||
|
var
|
||||||
|
OldIsLimited: Boolean;
|
||||||
|
begin
|
||||||
|
if (FMaxDate = AValue) then Exit;
|
||||||
|
CheckRange(AValue, SysUtils.MinDateTime, SysUtils.MaxDateTime);
|
||||||
|
OldIsLimited := IsLimited;
|
||||||
|
FMaxDate := AValue;
|
||||||
|
if IsLimited then
|
||||||
|
begin
|
||||||
|
ApplyLimits;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
if OldIsLimited then
|
||||||
|
RemoveLimits;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TCustomCalendar.SetMinDate(AValue: TDateTime);
|
||||||
|
var
|
||||||
|
OldIsLimited: Boolean;
|
||||||
|
begin
|
||||||
|
if (FMinDate = AValue) then Exit;
|
||||||
|
CheckRange(AValue, SysUtils.MinDateTime, SysUtils.MaxDateTime);
|
||||||
|
OldIsLimited := IsLimited;
|
||||||
|
FMinDate := AValue;
|
||||||
|
if IsLimited then
|
||||||
|
ApplyLimits
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
if OldIsLimited then
|
||||||
|
RemoveLimits;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TCustomCalendar.SetProps;
|
procedure TCustomCalendar.SetProps;
|
||||||
begin
|
begin
|
||||||
if HandleAllocated and ([csLoading,csDestroying]*ComponentState=[]) then
|
if HandleAllocated and ([csLoading,csDestroying]*ComponentState=[]) then
|
||||||
@ -323,6 +419,14 @@ begin
|
|||||||
TWSCustomCalendarClass(WidgetSetClass).SetDateTime(Self, FDate);
|
TWSCustomCalendarClass(WidgetSetClass).SetDateTime(Self, FDate);
|
||||||
TWSCustomCalendarClass(WidgetSetClass).SetDisplaySettings(Self, FDisplaySettings);
|
TWSCustomCalendarClass(WidgetSetClass).SetDisplaySettings(Self, FDisplaySettings);
|
||||||
TWSCustomCalendarClass(WidgetSetClass).SetFirstDayOfWeek(Self, FFirstDayOfWeek);
|
TWSCustomCalendarClass(WidgetSetClass).SetFirstDayOfWeek(Self, FFirstDayOfWeek);
|
||||||
|
if FLimitsChanged then //avoid settting limits on each SetProps
|
||||||
|
begin
|
||||||
|
if IsLimited then
|
||||||
|
TWSCustomCalendarClass(WidgetSetClass).SetMinMaxDate(Self,FMinDate, FMaxDate)
|
||||||
|
else
|
||||||
|
TWSCustomCalendarClass(WidgetSetClass).RemoveMinMaxDates(Self);
|
||||||
|
FLimitsChanged := False;
|
||||||
|
end;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
FPropsChanged := True;
|
FPropsChanged := True;
|
||||||
@ -335,7 +439,6 @@ var
|
|||||||
NewDay, NewMonth, NewYear: word;
|
NewDay, NewMonth, NewYear: word;
|
||||||
begin
|
begin
|
||||||
NewDate := TWSCustomCalendarClass(WidgetSetClass).GetDateTime(Self);
|
NewDate := TWSCustomCalendarClass(WidgetSetClass).GetDateTime(Self);
|
||||||
if (NewDate=FDate) then exit;
|
|
||||||
DecodeDate(NewDate, NewYear, NewMonth, NewDay);
|
DecodeDate(NewDate, NewYear, NewMonth, NewDay);
|
||||||
DecodeDate(FDate, OldYear, OldMonth, OldDay);
|
DecodeDate(FDate, OldYear, OldMonth, OldDay);
|
||||||
FDate:= NewDate;
|
FDate:= NewDate;
|
||||||
|
@ -93,5 +93,13 @@
|
|||||||
<issue name="TMenuItem.Default">
|
<issue name="TMenuItem.Default">
|
||||||
<short>Default property is not supported</short>
|
<short>Default property is not supported</short>
|
||||||
</issue>
|
</issue>
|
||||||
|
<issue name="TCalendar.MinDate">
|
||||||
|
<short>MinDate property is not (fully) supported</short>
|
||||||
|
<descr>While programmatically setting a date is limited by MinDate/MaxDate, the calendar still allow to select dates that are out of that range</descr>
|
||||||
|
</issue>
|
||||||
|
<issue name="TCalendar.MinDate">
|
||||||
|
<short>MaxDate property is not (fully) supported</short>
|
||||||
|
<descr>While programmatically setting a date is limited by MinDate/MaxDate, the calendar still allow to select dates that are out of that range</descr>
|
||||||
|
</issue>
|
||||||
</widgetset>
|
</widgetset>
|
||||||
</package>
|
</package>
|
||||||
|
@ -28,5 +28,13 @@
|
|||||||
<issue name="TPageControl.TabWidth">
|
<issue name="TPageControl.TabWidth">
|
||||||
<short>Changing of default tab width is not supported</short>
|
<short>Changing of default tab width is not supported</short>
|
||||||
</issue>
|
</issue>
|
||||||
|
<issue name="TCalendar.MinDate">
|
||||||
|
<short>MinDate property is not (fully) supported</short>
|
||||||
|
<descr>While programmatically setting a date is limited by MinDate/MaxDate, the calendar still allow to select dates that are out of that range</descr>
|
||||||
|
</issue>
|
||||||
|
<issue name="TCalendar.MinDate">
|
||||||
|
<short>MaxDate property is not (fully) supported</short>
|
||||||
|
<descr>While programmatically setting a date is limited by MinDate/MaxDate, the calendar still allow to select dates that are out of that range</descr>
|
||||||
|
</issue>
|
||||||
</widgetset>
|
</widgetset>
|
||||||
</package>
|
</package>
|
||||||
|
@ -1855,6 +1855,8 @@ type
|
|||||||
function GetDateTime: TDateTime;
|
function GetDateTime: TDateTime;
|
||||||
procedure SetDateTime(const AValue: TDateTime);
|
procedure SetDateTime(const AValue: TDateTime);
|
||||||
procedure SetSelectedDate(const AValue: QDateH);
|
procedure SetSelectedDate(const AValue: QDateH);
|
||||||
|
procedure SetMinDate(AMinDate: TDateTime);
|
||||||
|
procedure SetMaxDate(AMaxDate: TDateTime);
|
||||||
protected
|
protected
|
||||||
function CreateWidget(const AParams: TCreateParams):QWidgetH; override;
|
function CreateWidget(const AParams: TCreateParams):QWidgetH; override;
|
||||||
public
|
public
|
||||||
@ -1876,6 +1878,8 @@ type
|
|||||||
procedure SignalSelectionChanged; cdecl;
|
procedure SignalSelectionChanged; cdecl;
|
||||||
procedure SignalCurrentPageChanged(p1, p2: Integer); cdecl;
|
procedure SignalCurrentPageChanged(p1, p2: Integer); cdecl;
|
||||||
property DateTime: TDateTime read GetDateTime write SetDateTime;
|
property DateTime: TDateTime read GetDateTime write SetDateTime;
|
||||||
|
property MinDate: TDateTime write SetMinDate;
|
||||||
|
property MaxDate: TDateTime write SetMaxDate;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// for page control / notebook
|
// for page control / notebook
|
||||||
@ -17615,6 +17619,26 @@ begin
|
|||||||
QCalendarWidget_setSelectedDate(QCalendarWidgetH(Widget), AValue);
|
QCalendarWidget_setSelectedDate(QCalendarWidgetH(Widget), AValue);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TQtCalendar.SetMinDate(AMinDate: TDateTime);
|
||||||
|
var
|
||||||
|
Date: QDateH;
|
||||||
|
begin
|
||||||
|
DecodeDate(AMinDate, AYear, AMonth, ADay);
|
||||||
|
Date := QDate_create(AYear, AMonth, ADay);
|
||||||
|
QCalendarWidget_setMinimumDate(QCalendarWidgetH(Widget),Date);
|
||||||
|
QDate_destroy(Date);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TQtCalendar.SetMaxDate(AMaxDate: TDateTime);
|
||||||
|
var
|
||||||
|
Date: QDateH;
|
||||||
|
begin
|
||||||
|
DecodeDate(AMaxDate, AYear, AMonth, ADay);
|
||||||
|
Date := QDate_create(AYear, AMonth, ADay);
|
||||||
|
QCalendarWidget_setMaximumDate(QCalendarWidgetH(Widget),Date);
|
||||||
|
QDate_destroy(Date);
|
||||||
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
Function: TQtCalendar.CreateWidget
|
Function: TQtCalendar.CreateWidget
|
||||||
Params: None
|
Params: None
|
||||||
@ -17971,7 +17995,7 @@ end;
|
|||||||
with pure Qt C++ app this works ok, but via bindings get
|
with pure Qt C++ app this works ok, but via bindings get
|
||||||
impossible year & month values ...
|
impossible year & month values ...
|
||||||
------------------------------------------------------------------------------}
|
------------------------------------------------------------------------------}
|
||||||
procedure TQtCalendar.signalCurrentPageChanged(p1, p2: Integer); cdecl;
|
procedure TQtCalendar.SignalCurrentPageChanged(p1, p2: Integer); cdecl;
|
||||||
var
|
var
|
||||||
Msg: TLMessage;
|
Msg: TLMessage;
|
||||||
ADate: QDateH;
|
ADate: QDateH;
|
||||||
|
@ -43,6 +43,8 @@ type
|
|||||||
class procedure SetDateTime(const ACalendar: TCustomCalendar; const ADateTime: TDateTime); override;
|
class procedure SetDateTime(const ACalendar: TCustomCalendar; const ADateTime: TDateTime); override;
|
||||||
class procedure SetDisplaySettings(const ACalendar: TCustomCalendar; const ADisplaySettings: TDisplaySettings); override;
|
class procedure SetDisplaySettings(const ACalendar: TCustomCalendar; const ADisplaySettings: TDisplaySettings); override;
|
||||||
class procedure SetFirstDayOfWeek(const ACalendar: TCustomCalendar; const ADayOfWeek: TCalDayOfWeek); override;
|
class procedure SetFirstDayOfWeek(const ACalendar: TCustomCalendar; const ADayOfWeek: TCalDayOfWeek); override;
|
||||||
|
class procedure SetMinMaxDate(const ACalendar: TCustomCalendar; AMinDate, AMaxDate: TDateTime); override;
|
||||||
|
class procedure RemoveMinMaxDates(const ACalendar: TCustomCalendar); override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -137,4 +139,26 @@ begin
|
|||||||
QtCalendar.EndUpdate;
|
QtCalendar.EndUpdate;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
class procedure TQtWSCustomCalendar.SetMinMaxDate(const ACalendar: TCustomCalendar; AMinDate, AMaxDate: TDateTime);
|
||||||
|
var
|
||||||
|
QtCalendar: TQtCalendar;
|
||||||
|
begin
|
||||||
|
QtCalendar := TQtCalendar(ACalendar.Handle);
|
||||||
|
QtCalendar.BeginUpdate;
|
||||||
|
QtCalendar.MinDate := AMinDate;
|
||||||
|
QtCalendar.MaxDate := AMaxDate;
|
||||||
|
QtCalendar.EndUpdate;
|
||||||
|
end;
|
||||||
|
|
||||||
|
class procedure TQtWSCustomCalendar.RemoveMinMaxDates(const ACalendar: TCustomCalendar);
|
||||||
|
var
|
||||||
|
QtCalendar: TQtCalendar;
|
||||||
|
begin
|
||||||
|
QtCalendar := TQtCalendar(ACalendar.Handle);
|
||||||
|
QtCalendar.BeginUpdate;
|
||||||
|
QtCalendar.MinDate := MinDateTime;
|
||||||
|
QtCalendar.MaxDate := MaxDateTime;
|
||||||
|
QtCalendar.EndUpdate;
|
||||||
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
@ -52,6 +52,8 @@ type
|
|||||||
class procedure SetDateTime(const ACalendar: TCustomCalendar; const ADateTime: TDateTime); override;
|
class procedure SetDateTime(const ACalendar: TCustomCalendar; const ADateTime: TDateTime); override;
|
||||||
class procedure SetDisplaySettings(const ACalendar: TCustomCalendar; const ASettings: TDisplaySettings); override;
|
class procedure SetDisplaySettings(const ACalendar: TCustomCalendar; const ASettings: TDisplaySettings); override;
|
||||||
class procedure SetFirstDayOfWeek(const ACalendar: TCustomCalendar; const ADayOfWeek: TCalDayOfWeek); override;
|
class procedure SetFirstDayOfWeek(const ACalendar: TCustomCalendar; const ADayOfWeek: TCalDayOfWeek); override;
|
||||||
|
class procedure SetMinMaxDate(const ACalendar: TCustomCalendar; AMinDate, AMaxDate: TDateTime); override;
|
||||||
|
class procedure RemoveMinMaxDates(const ACalendar: TCustomCalendar); override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -238,4 +240,32 @@ begin
|
|||||||
MonthCal_SetFirstDayOfWeek(ACalendar.Handle, dow);
|
MonthCal_SetFirstDayOfWeek(ACalendar.Handle, dow);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
class procedure TWin32WSCustomCalendar.SetMinMaxDate(const ACalendar: TCustomCalendar; AMinDate, AMaxDate: TDateTime);
|
||||||
|
var
|
||||||
|
ST: packed array[0..1] of TSystemTime;
|
||||||
|
const
|
||||||
|
WinMinDate = TDateTime(-109205.50000000000000000); // 1601-01-01
|
||||||
|
begin
|
||||||
|
if not WSCheckHandleAllocated(ACalendar, 'TWin32WSCustomCalendar.SetMinMaxDate') then
|
||||||
|
Exit;
|
||||||
|
//Windows won't set the limits if AMin < WinMin, and previous limits will then still apply
|
||||||
|
if (AMinDate < WinMinDate) then
|
||||||
|
AMinDate := WinMinDate;
|
||||||
|
DecodeDate(AMinDate, ST[0].Year, ST[0].Month, ST[0].Day);
|
||||||
|
DecodeDate(AMaxDate, ST[1].Year, ST[1].Month, ST[1].Day);
|
||||||
|
SendMessage(ACalendar.Handle, MCM_SETRANGE, Windows.WParam(GDTR_MIN or GDTR_MAX), Windows.LParam(@ST));
|
||||||
|
end;
|
||||||
|
|
||||||
|
class procedure TWin32WSCustomCalendar.RemoveMinMaxDates(
|
||||||
|
const ACalendar: TCustomCalendar);
|
||||||
|
var
|
||||||
|
ST: packed array[0..1] of TSystemTime;
|
||||||
|
begin
|
||||||
|
if not WSCheckHandleAllocated(ACalendar, 'TWin32WSCustomCalendar.RemoveMinMaxDates') then
|
||||||
|
Exit;
|
||||||
|
FillChar(ST, SizeOf(ST), 0);
|
||||||
|
SendMessage(ACalendar.Handle, MCM_SETRANGE, Windows.WParam(GDTR_MIN or GDTR_MAX), Windows.LParam(@ST));
|
||||||
|
RecreateWnd(ACalendar); //otherwise does not seem to work (BB)
|
||||||
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
@ -44,6 +44,8 @@ type
|
|||||||
class procedure SetDateTime(const ACalendar: TCustomCalendar; const ADateTime: TDateTime); override;
|
class procedure SetDateTime(const ACalendar: TCustomCalendar; const ADateTime: TDateTime); override;
|
||||||
class procedure SetDisplaySettings(const ACalendar: TCustomCalendar; const ASettings: TDisplaySettings); override;
|
class procedure SetDisplaySettings(const ACalendar: TCustomCalendar; const ASettings: TDisplaySettings); override;
|
||||||
class procedure SetFirstDayOfWeek(const ACalendar: TCustomCalendar; const ADayOfWeek: TCalDayOfWeek); override;
|
class procedure SetFirstDayOfWeek(const ACalendar: TCustomCalendar; const ADayOfWeek: TCalDayOfWeek); override;
|
||||||
|
class procedure SetMinMaxDate(const ACalendar: TCustomCalendar; const AMinDate, AMaxDate: TDateTime); override;
|
||||||
|
class procedure RemoveMinMaxDates(const ACalendar: TCustomCalendar); override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
@ -160,4 +162,33 @@ begin
|
|||||||
// MonthCal_SetFirstDayOfWeek not supported by WinCE
|
// MonthCal_SetFirstDayOfWeek not supported by WinCE
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
class procedure TWinCEWSCustomCalendar.SetMinMaxDate(
|
||||||
|
const ACalendar: TCustomCalendar; const AMinDate, AMaxDate: TDateTime);
|
||||||
|
var
|
||||||
|
ST: packed array[0..1] of TSystemTime;
|
||||||
|
const
|
||||||
|
WinMinDate = TDateTime(-109205.50000000000000000); // 1601-01-01
|
||||||
|
begin
|
||||||
|
if not WSCheckHandleAllocated(ACalendar, 'TWin32WSCustomCalendar.SetMinMaxDate') then
|
||||||
|
Exit;
|
||||||
|
//Windows won't set the limits if AMin < WinMin, and previous limits will then still apply
|
||||||
|
if (AMinDate < WinMinDate) then
|
||||||
|
AMinDate := WinMinDate;
|
||||||
|
DecodeDate(AMinDate, ST[0].Year, ST[0].Month, ST[0].Day);
|
||||||
|
DecodeDate(AMaxDate, ST[1].Year, ST[1].Month, ST[1].Day);
|
||||||
|
SendMessage(ACalendar.Handle, MCM_SETRANGE, Windows.WParam(GDTR_MIN or GDTR_MAX), Windows.LParam(@ST));
|
||||||
|
end;
|
||||||
|
|
||||||
|
class procedure TWinCEWSCustomCalendar.RemoveMinMaxDates(
|
||||||
|
const ACalendar: TCustomCalendar);
|
||||||
|
var
|
||||||
|
ST: packed array[0..1] of TSystemTime;
|
||||||
|
begin
|
||||||
|
if not WSCheckHandleAllocated(ACalendar, 'TWinCEWSCustomCalendar.RemoveMinMaxDates') then
|
||||||
|
Exit;
|
||||||
|
FillChar(ST, SizeOf(ST), 0);
|
||||||
|
SendMessage(ACalendar.Handle, MCM_SETRANGE, Windows.WParam(GDTR_MIN or GDTR_MAX), Windows.LParam(@ST));
|
||||||
|
RecreateWnd(ACalendar); //otherwise does not seem to work (BB)
|
||||||
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
@ -221,6 +221,16 @@ msgstr ""
|
|||||||
msgid "Custom ..."
|
msgid "Custom ..."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: lclstrconsts.rsdatetoolarge
|
||||||
|
#, object-pascal-format
|
||||||
|
msgid "Date cannot be past %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: lclstrconsts.rsdatetoosmall
|
||||||
|
#, object-pascal-format
|
||||||
|
msgid "Date cannot be before %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: lclstrconsts.rsdefaultcolorcaption
|
#: lclstrconsts.rsdefaultcolorcaption
|
||||||
msgid "Default"
|
msgid "Default"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -217,6 +217,16 @@ msgstr "Schedarii di cursore"
|
|||||||
msgid "Custom ..."
|
msgid "Custom ..."
|
||||||
msgstr "Persunalizatu…"
|
msgstr "Persunalizatu…"
|
||||||
|
|
||||||
|
#: lclstrconsts.rsdatetoolarge
|
||||||
|
#, object-pascal-format
|
||||||
|
msgid "Date cannot be past %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: lclstrconsts.rsdatetoosmall
|
||||||
|
#, object-pascal-format
|
||||||
|
msgid "Date cannot be before %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: lclstrconsts.rsdefaultcolorcaption
|
#: lclstrconsts.rsdefaultcolorcaption
|
||||||
msgid "Default"
|
msgid "Default"
|
||||||
msgstr "Predefinitu"
|
msgstr "Predefinitu"
|
||||||
|
@ -220,6 +220,16 @@ msgstr "Ukazatel"
|
|||||||
msgid "Custom ..."
|
msgid "Custom ..."
|
||||||
msgstr "Vlastní..."
|
msgstr "Vlastní..."
|
||||||
|
|
||||||
|
#: lclstrconsts.rsdatetoolarge
|
||||||
|
#, object-pascal-format
|
||||||
|
msgid "Date cannot be past %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: lclstrconsts.rsdatetoosmall
|
||||||
|
#, object-pascal-format
|
||||||
|
msgid "Date cannot be before %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: lclstrconsts.rsdefaultcolorcaption
|
#: lclstrconsts.rsdefaultcolorcaption
|
||||||
msgid "Default"
|
msgid "Default"
|
||||||
msgstr "Výchozí"
|
msgstr "Výchozí"
|
||||||
|
@ -219,6 +219,16 @@ msgstr "Zeiger"
|
|||||||
msgid "Custom ..."
|
msgid "Custom ..."
|
||||||
msgstr "Eigene ..."
|
msgstr "Eigene ..."
|
||||||
|
|
||||||
|
#: lclstrconsts.rsdatetoolarge
|
||||||
|
#, object-pascal-format
|
||||||
|
msgid "Date cannot be past %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: lclstrconsts.rsdatetoosmall
|
||||||
|
#, object-pascal-format
|
||||||
|
msgid "Date cannot be before %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: lclstrconsts.rsdefaultcolorcaption
|
#: lclstrconsts.rsdefaultcolorcaption
|
||||||
msgid "Default"
|
msgid "Default"
|
||||||
msgstr "Voreingestellt"
|
msgstr "Voreingestellt"
|
||||||
|
@ -218,6 +218,16 @@ msgstr "Cursor"
|
|||||||
msgid "Custom ..."
|
msgid "Custom ..."
|
||||||
msgstr "Personalizado ..."
|
msgstr "Personalizado ..."
|
||||||
|
|
||||||
|
#: lclstrconsts.rsdatetoolarge
|
||||||
|
#, object-pascal-format
|
||||||
|
msgid "Date cannot be past %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: lclstrconsts.rsdatetoosmall
|
||||||
|
#, object-pascal-format
|
||||||
|
msgid "Date cannot be before %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: lclstrconsts.rsdefaultcolorcaption
|
#: lclstrconsts.rsdefaultcolorcaption
|
||||||
msgid "Default"
|
msgid "Default"
|
||||||
msgstr "Predeterminado"
|
msgstr "Predeterminado"
|
||||||
|
@ -216,6 +216,16 @@ msgstr "Kursori"
|
|||||||
msgid "Custom ..."
|
msgid "Custom ..."
|
||||||
msgstr "Mukautetut ..."
|
msgstr "Mukautetut ..."
|
||||||
|
|
||||||
|
#: lclstrconsts.rsdatetoolarge
|
||||||
|
#, object-pascal-format
|
||||||
|
msgid "Date cannot be past %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: lclstrconsts.rsdatetoosmall
|
||||||
|
#, object-pascal-format
|
||||||
|
msgid "Date cannot be before %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: lclstrconsts.rsdefaultcolorcaption
|
#: lclstrconsts.rsdefaultcolorcaption
|
||||||
msgid "Default"
|
msgid "Default"
|
||||||
msgstr "Oletus"
|
msgstr "Oletus"
|
||||||
|
@ -218,6 +218,16 @@ msgstr "Curseur"
|
|||||||
msgid "Custom ..."
|
msgid "Custom ..."
|
||||||
msgstr "Personnalisé..."
|
msgstr "Personnalisé..."
|
||||||
|
|
||||||
|
#: lclstrconsts.rsdatetoolarge
|
||||||
|
#, object-pascal-format
|
||||||
|
msgid "Date cannot be past %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: lclstrconsts.rsdatetoosmall
|
||||||
|
#, object-pascal-format
|
||||||
|
msgid "Date cannot be before %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: lclstrconsts.rsdefaultcolorcaption
|
#: lclstrconsts.rsdefaultcolorcaption
|
||||||
msgid "Default"
|
msgid "Default"
|
||||||
msgstr "Par défaut"
|
msgstr "Par défaut"
|
||||||
|
@ -220,6 +220,16 @@ msgstr "סמן"
|
|||||||
msgid "Custom ..."
|
msgid "Custom ..."
|
||||||
msgstr "מותאם אישית ..."
|
msgstr "מותאם אישית ..."
|
||||||
|
|
||||||
|
#: lclstrconsts.rsdatetoolarge
|
||||||
|
#, object-pascal-format
|
||||||
|
msgid "Date cannot be past %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: lclstrconsts.rsdatetoosmall
|
||||||
|
#, object-pascal-format
|
||||||
|
msgid "Date cannot be before %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: lclstrconsts.rsdefaultcolorcaption
|
#: lclstrconsts.rsdefaultcolorcaption
|
||||||
msgid "Default"
|
msgid "Default"
|
||||||
msgstr "ברירת מחדל"
|
msgstr "ברירת מחדל"
|
||||||
|
@ -218,6 +218,16 @@ msgstr "Kurzor"
|
|||||||
msgid "Custom ..."
|
msgid "Custom ..."
|
||||||
msgstr "Egyéni ..."
|
msgstr "Egyéni ..."
|
||||||
|
|
||||||
|
#: lclstrconsts.rsdatetoolarge
|
||||||
|
#, object-pascal-format
|
||||||
|
msgid "Date cannot be past %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: lclstrconsts.rsdatetoosmall
|
||||||
|
#, object-pascal-format
|
||||||
|
msgid "Date cannot be before %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: lclstrconsts.rsdefaultcolorcaption
|
#: lclstrconsts.rsdefaultcolorcaption
|
||||||
msgid "Default"
|
msgid "Default"
|
||||||
msgstr "Alapértelmezett"
|
msgstr "Alapértelmezett"
|
||||||
|
@ -222,6 +222,16 @@ msgstr ""
|
|||||||
msgid "Custom ..."
|
msgid "Custom ..."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: lclstrconsts.rsdatetoolarge
|
||||||
|
#, object-pascal-format
|
||||||
|
msgid "Date cannot be past %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: lclstrconsts.rsdatetoosmall
|
||||||
|
#, object-pascal-format
|
||||||
|
msgid "Date cannot be before %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: lclstrconsts.rsdefaultcolorcaption
|
#: lclstrconsts.rsdefaultcolorcaption
|
||||||
msgid "Default"
|
msgid "Default"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -220,6 +220,16 @@ msgstr "cursore"
|
|||||||
msgid "Custom ..."
|
msgid "Custom ..."
|
||||||
msgstr "Personalizzato ..."
|
msgstr "Personalizzato ..."
|
||||||
|
|
||||||
|
#: lclstrconsts.rsdatetoolarge
|
||||||
|
#, object-pascal-format
|
||||||
|
msgid "Date cannot be past %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: lclstrconsts.rsdatetoosmall
|
||||||
|
#, object-pascal-format
|
||||||
|
msgid "Date cannot be before %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: lclstrconsts.rsdefaultcolorcaption
|
#: lclstrconsts.rsdefaultcolorcaption
|
||||||
msgid "Default"
|
msgid "Default"
|
||||||
msgstr "Standard"
|
msgstr "Standard"
|
||||||
|
@ -218,6 +218,16 @@ msgstr "カーソルファイル"
|
|||||||
msgid "Custom ..."
|
msgid "Custom ..."
|
||||||
msgstr "カスタム色"
|
msgstr "カスタム色"
|
||||||
|
|
||||||
|
#: lclstrconsts.rsdatetoolarge
|
||||||
|
#, object-pascal-format
|
||||||
|
msgid "Date cannot be past %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: lclstrconsts.rsdatetoosmall
|
||||||
|
#, object-pascal-format
|
||||||
|
msgid "Date cannot be before %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: lclstrconsts.rsdefaultcolorcaption
|
#: lclstrconsts.rsdefaultcolorcaption
|
||||||
msgid "Default"
|
msgid "Default"
|
||||||
msgstr "デフォルト色"
|
msgstr "デフォルト色"
|
||||||
|
@ -220,6 +220,16 @@ msgstr "Žymeklis"
|
|||||||
msgid "Custom ..."
|
msgid "Custom ..."
|
||||||
msgstr "Naudotojo…"
|
msgstr "Naudotojo…"
|
||||||
|
|
||||||
|
#: lclstrconsts.rsdatetoolarge
|
||||||
|
#, object-pascal-format
|
||||||
|
msgid "Date cannot be past %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: lclstrconsts.rsdatetoosmall
|
||||||
|
#, object-pascal-format
|
||||||
|
msgid "Date cannot be before %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: lclstrconsts.rsdefaultcolorcaption
|
#: lclstrconsts.rsdefaultcolorcaption
|
||||||
msgid "Default"
|
msgid "Default"
|
||||||
msgstr "Numatytasis"
|
msgstr "Numatytasis"
|
||||||
|
@ -223,6 +223,16 @@ msgstr "Cursor"
|
|||||||
msgid "Custom ..."
|
msgid "Custom ..."
|
||||||
msgstr "Aangepast ..."
|
msgstr "Aangepast ..."
|
||||||
|
|
||||||
|
#: lclstrconsts.rsdatetoolarge
|
||||||
|
#, object-pascal-format
|
||||||
|
msgid "Date cannot be past %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: lclstrconsts.rsdatetoosmall
|
||||||
|
#, object-pascal-format
|
||||||
|
msgid "Date cannot be before %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: lclstrconsts.rsdefaultcolorcaption
|
#: lclstrconsts.rsdefaultcolorcaption
|
||||||
msgid "Default"
|
msgid "Default"
|
||||||
msgstr "Standaard"
|
msgstr "Standaard"
|
||||||
|
@ -220,6 +220,16 @@ msgstr ""
|
|||||||
msgid "Custom ..."
|
msgid "Custom ..."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: lclstrconsts.rsdatetoolarge
|
||||||
|
#, object-pascal-format
|
||||||
|
msgid "Date cannot be past %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: lclstrconsts.rsdatetoosmall
|
||||||
|
#, object-pascal-format
|
||||||
|
msgid "Date cannot be before %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: lclstrconsts.rsdefaultcolorcaption
|
#: lclstrconsts.rsdefaultcolorcaption
|
||||||
msgid "Default"
|
msgid "Default"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -219,6 +219,16 @@ msgstr "Kursor"
|
|||||||
msgid "Custom ..."
|
msgid "Custom ..."
|
||||||
msgstr "Inny..."
|
msgstr "Inny..."
|
||||||
|
|
||||||
|
#: lclstrconsts.rsdatetoolarge
|
||||||
|
#, object-pascal-format
|
||||||
|
msgid "Date cannot be past %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: lclstrconsts.rsdatetoosmall
|
||||||
|
#, object-pascal-format
|
||||||
|
msgid "Date cannot be before %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: lclstrconsts.rsdefaultcolorcaption
|
#: lclstrconsts.rsdefaultcolorcaption
|
||||||
msgid "Default"
|
msgid "Default"
|
||||||
msgstr "Domyślny"
|
msgstr "Domyślny"
|
||||||
|
@ -207,6 +207,16 @@ msgstr ""
|
|||||||
msgid "Custom ..."
|
msgid "Custom ..."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: lclstrconsts.rsdatetoolarge
|
||||||
|
#, object-pascal-format
|
||||||
|
msgid "Date cannot be past %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: lclstrconsts.rsdatetoosmall
|
||||||
|
#, object-pascal-format
|
||||||
|
msgid "Date cannot be before %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: lclstrconsts.rsdefaultcolorcaption
|
#: lclstrconsts.rsdefaultcolorcaption
|
||||||
msgid "Default"
|
msgid "Default"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -216,6 +216,16 @@ msgstr "Cursor"
|
|||||||
msgid "Custom ..."
|
msgid "Custom ..."
|
||||||
msgstr "Personalizado ..."
|
msgstr "Personalizado ..."
|
||||||
|
|
||||||
|
#: lclstrconsts.rsdatetoolarge
|
||||||
|
#, object-pascal-format
|
||||||
|
msgid "Date cannot be past %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: lclstrconsts.rsdatetoosmall
|
||||||
|
#, object-pascal-format
|
||||||
|
msgid "Date cannot be before %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: lclstrconsts.rsdefaultcolorcaption
|
#: lclstrconsts.rsdefaultcolorcaption
|
||||||
msgid "Default"
|
msgid "Default"
|
||||||
msgstr "Padrão"
|
msgstr "Padrão"
|
||||||
|
@ -218,6 +218,16 @@ msgstr "Cursor"
|
|||||||
msgid "Custom ..."
|
msgid "Custom ..."
|
||||||
msgstr "Personalizado ..."
|
msgstr "Personalizado ..."
|
||||||
|
|
||||||
|
#: lclstrconsts.rsdatetoolarge
|
||||||
|
#, object-pascal-format
|
||||||
|
msgid "Date cannot be past %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: lclstrconsts.rsdatetoosmall
|
||||||
|
#, object-pascal-format
|
||||||
|
msgid "Date cannot be before %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: lclstrconsts.rsdefaultcolorcaption
|
#: lclstrconsts.rsdefaultcolorcaption
|
||||||
msgid "Default"
|
msgid "Default"
|
||||||
msgstr "Padrão"
|
msgstr "Padrão"
|
||||||
|
@ -214,6 +214,16 @@ msgstr "Файлы курсоров"
|
|||||||
msgid "Custom ..."
|
msgid "Custom ..."
|
||||||
msgstr "Пользовательский ..."
|
msgstr "Пользовательский ..."
|
||||||
|
|
||||||
|
#: lclstrconsts.rsdatetoolarge
|
||||||
|
#, object-pascal-format
|
||||||
|
msgid "Date cannot be past %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: lclstrconsts.rsdatetoosmall
|
||||||
|
#, object-pascal-format
|
||||||
|
msgid "Date cannot be before %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: lclstrconsts.rsdefaultcolorcaption
|
#: lclstrconsts.rsdefaultcolorcaption
|
||||||
msgid "Default"
|
msgid "Default"
|
||||||
msgstr "По умолчанию"
|
msgstr "По умолчанию"
|
||||||
|
@ -216,6 +216,16 @@ msgstr "Kurzorové súbory"
|
|||||||
msgid "Custom ..."
|
msgid "Custom ..."
|
||||||
msgstr "Vlastná ..."
|
msgstr "Vlastná ..."
|
||||||
|
|
||||||
|
#: lclstrconsts.rsdatetoolarge
|
||||||
|
#, object-pascal-format
|
||||||
|
msgid "Date cannot be past %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: lclstrconsts.rsdatetoosmall
|
||||||
|
#, object-pascal-format
|
||||||
|
msgid "Date cannot be before %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: lclstrconsts.rsdefaultcolorcaption
|
#: lclstrconsts.rsdefaultcolorcaption
|
||||||
msgid "Default"
|
msgid "Default"
|
||||||
msgstr "Predvolené"
|
msgstr "Predvolené"
|
||||||
|
@ -218,6 +218,16 @@ msgstr "İmleç"
|
|||||||
msgid "Custom ..."
|
msgid "Custom ..."
|
||||||
msgstr "Özel ..."
|
msgstr "Özel ..."
|
||||||
|
|
||||||
|
#: lclstrconsts.rsdatetoolarge
|
||||||
|
#, object-pascal-format
|
||||||
|
msgid "Date cannot be past %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: lclstrconsts.rsdatetoosmall
|
||||||
|
#, object-pascal-format
|
||||||
|
msgid "Date cannot be before %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: lclstrconsts.rsdefaultcolorcaption
|
#: lclstrconsts.rsdefaultcolorcaption
|
||||||
msgid "Default"
|
msgid "Default"
|
||||||
msgstr "Varsayılan"
|
msgstr "Varsayılan"
|
||||||
|
@ -221,6 +221,16 @@ msgstr "Курсор"
|
|||||||
msgid "Custom ..."
|
msgid "Custom ..."
|
||||||
msgstr "Власний..."
|
msgstr "Власний..."
|
||||||
|
|
||||||
|
#: lclstrconsts.rsdatetoolarge
|
||||||
|
#, object-pascal-format
|
||||||
|
msgid "Date cannot be past %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: lclstrconsts.rsdatetoosmall
|
||||||
|
#, object-pascal-format
|
||||||
|
msgid "Date cannot be before %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: lclstrconsts.rsdefaultcolorcaption
|
#: lclstrconsts.rsdefaultcolorcaption
|
||||||
msgid "Default"
|
msgid "Default"
|
||||||
msgstr "За замовчуванням"
|
msgstr "За замовчуванням"
|
||||||
|
@ -219,6 +219,16 @@ msgstr "光标"
|
|||||||
msgid "Custom ..."
|
msgid "Custom ..."
|
||||||
msgstr "自定义..."
|
msgstr "自定义..."
|
||||||
|
|
||||||
|
#: lclstrconsts.rsdatetoolarge
|
||||||
|
#, object-pascal-format
|
||||||
|
msgid "Date cannot be past %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: lclstrconsts.rsdatetoosmall
|
||||||
|
#, object-pascal-format
|
||||||
|
msgid "Date cannot be before %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: lclstrconsts.rsdefaultcolorcaption
|
#: lclstrconsts.rsdefaultcolorcaption
|
||||||
msgid "Default"
|
msgid "Default"
|
||||||
msgstr "默认"
|
msgstr "默认"
|
||||||
|
@ -238,6 +238,8 @@ resourceString
|
|||||||
rsScrollBarOutOfRange = 'ScrollBar property out of range';
|
rsScrollBarOutOfRange = 'ScrollBar property out of range';
|
||||||
rsInvalidDate = 'Invalid Date : %s';
|
rsInvalidDate = 'Invalid Date : %s';
|
||||||
rsInvalidDateRangeHint = 'Invalid Date: %s. Must be between %s and %s';
|
rsInvalidDateRangeHint = 'Invalid Date: %s. Must be between %s and %s';
|
||||||
|
rsDateTooLarge = 'Date cannot be past %s';
|
||||||
|
rsDateTooSmall = 'Date cannot be before %s';
|
||||||
rsErrorOccurredInAtAddressFrame = 'Error occurred in %s at %sAddress %s%s'
|
rsErrorOccurredInAtAddressFrame = 'Error occurred in %s at %sAddress %s%s'
|
||||||
+' Frame %s';
|
+' Frame %s';
|
||||||
rsException = 'Exception';
|
rsException = 'Exception';
|
||||||
|
@ -55,6 +55,9 @@ type
|
|||||||
const ADisplaySettings: TDisplaySettings); virtual;
|
const ADisplaySettings: TDisplaySettings); virtual;
|
||||||
class procedure SetFirstDayOfWeek(const ACalendar: TCustomCalendar;
|
class procedure SetFirstDayOfWeek(const ACalendar: TCustomCalendar;
|
||||||
const ADayOfWeek: TCalDayOfWeek); virtual;
|
const ADayOfWeek: TCalDayOfWeek); virtual;
|
||||||
|
class procedure SetMinMaxDate(const ACalendar: TCustomCalendar;
|
||||||
|
AMinDate, AMaxDate: TDateTime); virtual;
|
||||||
|
class procedure RemoveMinMaxDates(const ACalendar: TCustomCalendar); virtual;
|
||||||
end;
|
end;
|
||||||
TWSCustomCalendarClass = class of TWSCustomCalendar;
|
TWSCustomCalendarClass = class of TWSCustomCalendar;
|
||||||
|
|
||||||
@ -97,6 +100,17 @@ class procedure TWSCustomCalendar.SetFirstDayOfWeek(const ACalendar: TCustomCale
|
|||||||
begin
|
begin
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
class procedure TWSCustomCalendar.SetMinMaxDate(
|
||||||
|
const ACalendar: TCustomCalendar; AMinDate, AMaxDate: TDateTime);
|
||||||
|
begin
|
||||||
|
end;
|
||||||
|
|
||||||
|
class procedure TWSCustomCalendar.RemoveMinMaxDates(
|
||||||
|
const ACalendar: TCustomCalendar);
|
||||||
|
begin
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
{ WidgetSetRegistration }
|
{ WidgetSetRegistration }
|
||||||
|
|
||||||
procedure RegisterCustomCalendar;
|
procedure RegisterCustomCalendar;
|
||||||
|
Loading…
Reference in New Issue
Block a user