The StartYear property is set to 2000 on all the datetime pickers in my application. This must be by default as I have never modified this property. Even when I drop a new TwwDBDatetimePicker on a form it still has 2000 as the StartYear. However, the TwwDBMonthCalendar StartYear has changed to 2010.
Is there somewhere that sets that StartYear property on the TwwDBDateTimePicker that overrides the value coming from TwwIntl. I even tried dropping a TwwIntl component on my base form and changed it's StartYear property to 2010.
Nothing has affected the StartYear property on the TwwDBDateTimePicker.
Leonard
I discovered that the problem was project specific when I tried creating a new project and the startyear defaulted properly.
So focused specifically on my project and found some code in my base form that reset the CalendarAttributes.PopupYearOptions.StartYear property. I don't know how I missed this last week.
if Self.Components[Counter] is TwwDBDateTimePicker then
begin
with Self.Components[Counter] as TwwDBDateTimePicker do
begin
if (Enabled = True) then
begin
if (Tag = 99) then
Color := clRed
else
if (Tag = 98) then
Color := clYellow;
end;
CalendarAttributes.PopupYearOptions.StartYear := 2000;
end;
end
It must have been a throwback to D7 when perhaps the wwIntl.pas was not defaulting the StartYear. Anyway, I removed the line of code and the DateTimePickers are now defaulting to the value in wwIntl.pas.
Thank You for your help.
Leonard