Merge branch calendar-minmaxdate into main.

This commit is contained in:
Bart 2022-07-21 12:33:52 +02:00
commit e97e733747
33 changed files with 495 additions and 11 deletions

View File

@ -30,7 +30,8 @@ interface
uses
{$IFDEF VerboseCalenderSetDate}LCLProc,{$ENDIF}
Types, SysUtils, Classes, LCLType, LCLStrConsts, lMessages, Controls, LResources;
Types, SysUtils, Classes, LCLType, LCLStrConsts, lMessages, Controls, LResources,
Math;
type
TDisplaySetting = (
@ -80,20 +81,31 @@ type
FDate: TDateTime; // last valid date
FDisplaySettings : TDisplaySettings;
FFirstDayOfWeek: TCalDayOfWeek;
FMinDate: TDateTime;
FMaxDate: TDateTime;
FOnChange: TNotifyEvent;
FDayChanged: TNotifyEvent;
FMonthChanged: TNotifyEvent;
FYearChanged: TNotifyEvent;
FPropsChanged: boolean;
FPropsChanged: Boolean;
FLimitsChanged: Boolean;
procedure CheckRange(ADate, AMinDate, AMaxDate: TDateTime);
function GetDateTime: TDateTime;
function GetMaxDateStored: Boolean;
function GetMixDateStored: Boolean;
procedure SetDateTime(const AValue: TDateTime);
procedure GetProps;
procedure SetMaxDate(AValue: TDateTime);
procedure SetMinDate(AValue: TDateTime);
procedure SetProps;
function GetDisplaySettings: TDisplaySettings;
procedure SetDisplaySettings(const AValue: TDisplaySettings);
function GetDate: String;
procedure SetDate(const AValue: String);
procedure SetFirstDayOfWeek(const AValue: TCalDayOfWeek);
function IsLimited: Boolean;
procedure ApplyLimits;
procedure RemoveLimits;
protected
class procedure WSRegisterClass; override;
procedure LMChanged(var Message: TLMessage); message LM_CHANGED;
@ -113,6 +125,8 @@ type
property DisplaySettings: TDisplaySettings read GetDisplaySettings
write SetDisplaySettings default DefaultDisplaySettings;
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 OnDayChanged: TNotifyEvent read FDayChanged write FDayChanged;
property OnMonthChanged: TNotifyEvent read FMonthChanged write FMonthChanged;
@ -181,6 +195,8 @@ end;
{ TCustomCalendar }
constructor TCustomCalendar.Create(AOwner: TComponent);
var
WSMinDate, WSMaxDate: TDateTime;
begin
inherited Create(AOwner);
fCompStyle := csCalendar;
@ -188,6 +204,9 @@ begin
FDisplaySettings := DefaultDisplaySettings;
FFirstDayOfWeek := dowDefault;
ControlStyle:=ControlStyle-[csTripleClicks,csQuadClicks,csAcceptsControls,csCaptureMouse];
FMinDate := 0.0;
FMaxDate := 0.0;
FLimitsChanged := False;
DateTime := Now;
end;
@ -265,12 +284,35 @@ begin
SetProps;
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;
begin
GetProps;
Result:=FDate;
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);
{$IFDEF WINDOWS}
var
@ -278,13 +320,10 @@ var
{$ENDIF}
begin
if AValue=FDate then exit;
{$IFDEF WINDOWS} // TODO: move this test to the win32 interface?
CalendarMinDate:=-53787;// 14 sep 1752, start of Gregorian calendar in England
CalendarMaxDate:=trunc(MaxDateTime);
if not ((AValue>=CalendarMinDate)and(AValue<=CalendarMaxDate)) then
raise EInvalidDate.CreateFmt(rsInvalidDateRangeHint, [DateToStr(AValue),
DateToStr(CalendarMinDate), DateToStr(CalendarMaxDate)]);
{$ENDIF}
if IsLimited then
CheckRange(AValue, FMinDate, FMaxDate)
else
CheckRange(AValue, SysUtils.MinDateTime, SysUtils.MaxDateTime);
FDate:=AValue;
FDateAsString:=FormatDateTime(DefaultFormatSettings.ShortDateFormat,FDate);
{$IFDEF VerboseCalenderSetDate}
@ -300,6 +339,27 @@ begin
SetProps;
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;
begin
if HandleAllocated and ([csLoading,csDestroying]*ComponentState=[]) then
@ -312,6 +372,42 @@ begin
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;
begin
if HandleAllocated and ([csLoading,csDestroying]*ComponentState=[]) then
@ -323,6 +419,14 @@ begin
TWSCustomCalendarClass(WidgetSetClass).SetDateTime(Self, FDate);
TWSCustomCalendarClass(WidgetSetClass).SetDisplaySettings(Self, FDisplaySettings);
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
else
FPropsChanged := True;
@ -335,7 +439,6 @@ var
NewDay, NewMonth, NewYear: word;
begin
NewDate := TWSCustomCalendarClass(WidgetSetClass).GetDateTime(Self);
if (NewDate=FDate) then exit;
DecodeDate(NewDate, NewYear, NewMonth, NewDay);
DecodeDate(FDate, OldYear, OldMonth, OldDay);
FDate:= NewDate;

View File

@ -93,5 +93,13 @@
<issue name="TMenuItem.Default">
<short>Default property is not supported</short>
</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>
</package>

View File

@ -28,5 +28,13 @@
<issue name="TPageControl.TabWidth">
<short>Changing of default tab width is not supported</short>
</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>
</package>

View File

@ -1855,6 +1855,8 @@ type
function GetDateTime: TDateTime;
procedure SetDateTime(const AValue: TDateTime);
procedure SetSelectedDate(const AValue: QDateH);
procedure SetMinDate(AMinDate: TDateTime);
procedure SetMaxDate(AMaxDate: TDateTime);
protected
function CreateWidget(const AParams: TCreateParams):QWidgetH; override;
public
@ -1876,6 +1878,8 @@ type
procedure SignalSelectionChanged; cdecl;
procedure SignalCurrentPageChanged(p1, p2: Integer); cdecl;
property DateTime: TDateTime read GetDateTime write SetDateTime;
property MinDate: TDateTime write SetMinDate;
property MaxDate: TDateTime write SetMaxDate;
end;
// for page control / notebook
@ -17615,6 +17619,26 @@ begin
QCalendarWidget_setSelectedDate(QCalendarWidgetH(Widget), AValue);
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
Params: None
@ -17971,7 +17995,7 @@ end;
with pure Qt C++ app this works ok, but via bindings get
impossible year & month values ...
------------------------------------------------------------------------------}
procedure TQtCalendar.signalCurrentPageChanged(p1, p2: Integer); cdecl;
procedure TQtCalendar.SignalCurrentPageChanged(p1, p2: Integer); cdecl;
var
Msg: TLMessage;
ADate: QDateH;

View File

@ -43,6 +43,8 @@ type
class procedure SetDateTime(const ACalendar: TCustomCalendar; const ADateTime: TDateTime); override;
class procedure SetDisplaySettings(const ACalendar: TCustomCalendar; const ADisplaySettings: TDisplaySettings); 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;
@ -137,4 +139,26 @@ begin
QtCalendar.EndUpdate;
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.

View File

@ -52,6 +52,8 @@ type
class procedure SetDateTime(const ACalendar: TCustomCalendar; const ADateTime: TDateTime); override;
class procedure SetDisplaySettings(const ACalendar: TCustomCalendar; const ASettings: TDisplaySettings); 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;
@ -238,4 +240,32 @@ begin
MonthCal_SetFirstDayOfWeek(ACalendar.Handle, dow);
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.

View File

@ -44,6 +44,8 @@ type
class procedure SetDateTime(const ACalendar: TCustomCalendar; const ADateTime: TDateTime); override;
class procedure SetDisplaySettings(const ACalendar: TCustomCalendar; const ASettings: TDisplaySettings); 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;
implementation
@ -160,4 +162,33 @@ begin
// MonthCal_SetFirstDayOfWeek not supported by WinCE
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.

View File

@ -221,6 +221,16 @@ msgstr ""
msgid "Custom ..."
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
msgid "Default"
msgstr ""

View File

@ -217,6 +217,16 @@ msgstr "Schedarii di cursore"
msgid "Custom ..."
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
msgid "Default"
msgstr "Predefinitu"

View File

@ -220,6 +220,16 @@ msgstr "Ukazatel"
msgid "Custom ..."
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
msgid "Default"
msgstr "Výchozí"

View File

@ -219,6 +219,16 @@ msgstr "Zeiger"
msgid "Custom ..."
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
msgid "Default"
msgstr "Voreingestellt"

View File

@ -218,6 +218,16 @@ msgstr "Cursor"
msgid "Custom ..."
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
msgid "Default"
msgstr "Predeterminado"

View File

@ -216,6 +216,16 @@ msgstr "Kursori"
msgid "Custom ..."
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
msgid "Default"
msgstr "Oletus"

View File

@ -218,6 +218,16 @@ msgstr "Curseur"
msgid "Custom ..."
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
msgid "Default"
msgstr "Par défaut"

View File

@ -220,6 +220,16 @@ msgstr "סמן"
msgid "Custom ..."
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
msgid "Default"
msgstr "ברירת מחדל"

View File

@ -218,6 +218,16 @@ msgstr "Kurzor"
msgid "Custom ..."
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
msgid "Default"
msgstr "Alapértelmezett"

View File

@ -222,6 +222,16 @@ msgstr ""
msgid "Custom ..."
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
msgid "Default"
msgstr ""

View File

@ -220,6 +220,16 @@ msgstr "cursore"
msgid "Custom ..."
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
msgid "Default"
msgstr "Standard"

View File

@ -218,6 +218,16 @@ msgstr "カーソルファイル"
msgid "Custom ..."
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
msgid "Default"
msgstr "デフォルト色"

View File

@ -220,6 +220,16 @@ msgstr "Žymeklis"
msgid "Custom ..."
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
msgid "Default"
msgstr "Numatytasis"

View File

@ -223,6 +223,16 @@ msgstr "Cursor"
msgid "Custom ..."
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
msgid "Default"
msgstr "Standaard"

View File

@ -220,6 +220,16 @@ msgstr ""
msgid "Custom ..."
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
msgid "Default"
msgstr ""

View File

@ -219,6 +219,16 @@ msgstr "Kursor"
msgid "Custom ..."
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
msgid "Default"
msgstr "Domyślny"

View File

@ -207,6 +207,16 @@ msgstr ""
msgid "Custom ..."
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
msgid "Default"
msgstr ""

View File

@ -216,6 +216,16 @@ msgstr "Cursor"
msgid "Custom ..."
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
msgid "Default"
msgstr "Padrão"

View File

@ -218,6 +218,16 @@ msgstr "Cursor"
msgid "Custom ..."
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
msgid "Default"
msgstr "Padrão"

View File

@ -214,6 +214,16 @@ msgstr "Файлы курсоров"
msgid "Custom ..."
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
msgid "Default"
msgstr "По умолчанию"

View File

@ -216,6 +216,16 @@ msgstr "Kurzorové súbory"
msgid "Custom ..."
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
msgid "Default"
msgstr "Predvolené"

View File

@ -218,6 +218,16 @@ msgstr "İmleç"
msgid "Custom ..."
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
msgid "Default"
msgstr "Varsayılan"

View File

@ -221,6 +221,16 @@ msgstr "Курсор"
msgid "Custom ..."
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
msgid "Default"
msgstr "За замовчуванням"

View File

@ -219,6 +219,16 @@ msgstr "光标"
msgid "Custom ..."
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
msgid "Default"
msgstr "默认"

View File

@ -238,6 +238,8 @@ resourceString
rsScrollBarOutOfRange = 'ScrollBar property out of range';
rsInvalidDate = 'Invalid Date : %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'
+' Frame %s';
rsException = 'Exception';

View File

@ -55,6 +55,9 @@ type
const ADisplaySettings: TDisplaySettings); virtual;
class procedure SetFirstDayOfWeek(const ACalendar: TCustomCalendar;
const ADayOfWeek: TCalDayOfWeek); virtual;
class procedure SetMinMaxDate(const ACalendar: TCustomCalendar;
AMinDate, AMaxDate: TDateTime); virtual;
class procedure RemoveMinMaxDates(const ACalendar: TCustomCalendar); virtual;
end;
TWSCustomCalendarClass = class of TWSCustomCalendar;
@ -97,6 +100,17 @@ class procedure TWSCustomCalendar.SetFirstDayOfWeek(const ACalendar: TCustomCale
begin
end;
class procedure TWSCustomCalendar.SetMinMaxDate(
const ACalendar: TCustomCalendar; AMinDate, AMaxDate: TDateTime);
begin
end;
class procedure TWSCustomCalendar.RemoveMinMaxDates(
const ACalendar: TCustomCalendar);
begin
end;
{ WidgetSetRegistration }
procedure RegisterCustomCalendar;