, normal and bold. TYearBoldManager .
30 31 1 1,2,3,4
: Delphi5 XP/3
minDate = 2015/03/30 maxDate = 2015/04/04
bold
procedure TForm1.FormCreate(Sender: TObject);
begin
MonthCalendar1.CalColors.MonthBackColor := $6A7678;
MonthCalendar1.CalColors.TextColor := $4D5858;
FYearBoldManager := TYearBoldManager.Create;
FYearBoldManager.MakeBold(3, 30);
FYearBoldManager.MakeBold(3, 31);
FYearBoldManager.MakeBold(4, 1);
FYearBoldManager.MakeBold(4, 2);
FYearBoldManager.MakeBold(4, 3);
FYearBoldManager.MakeBold(4, 4);
...
end;
, . .


4 , MonthCalendarDemo
:
MonthCalendarDemo.dpr
program MonthCalendarDemo;
uses
Forms,
Unit1 in 'Unit1.pas' {Form1},
UMonthBoldStorage in 'UMonthBoldStorage.pas';
{$R *.RES}
begin
Application.Initialize;
Application.CreateForm(TForm1, Form1);
Application.Run;
end.
UMonthBoldStorage.pas .
?

.
TDateTimePicker
a TMonthCalendar a TComboBox
:
- min-maxDate
days without logfile.- .
- .
- , (
25, ). - , ( , , . : 20 22).

TComboBox down-arrow ENTER .



procedure TForm1.MonthCalendar1DblClick(Sender: TObject);
var
year, month, day : Word;
begin
DecodeDate(MonthCalendar1.Date,Year, Month, Day);
if FYearBoldManager.GetDayStatus(month, day) then begin
if ValidDate then MonthCalendar1.Visible:=False;
end;
end;
procedure TForm1.MonthCalendar1Click(Sender: TObject);
var
year, month, day : Word;
begin
DecodeDate(MonthCalendar1.Date,Year, Month, Day);
if FYearBoldManager.GetDayStatus(month, day) then begin
lastValidDate := MonthCalendar1.Date;
ValidDate:=True;
end else begin
MonthCalendar1.Date := lastValidDate;
ValidDate:=False;
end;
end;
function TForm1.getComboBoxText(var validText:AnsiString):Boolean;
var
actText :AnsiString;
begin
if ComboBox1.Text = '' then actText := validText else actText := ComboBox1.Text;
Try
MonthCalendar1.Date := StrToDateTime(Copy(actText,1,10));
if actText <> validText then validText := actText;
lastValidDate := MonthCalendar1.Date;
ValidDate:=True;
Result := True;
except
Result := False;
end;
end;
procedure TForm1.ComboBox1Click(Sender: TObject);
begin
if getComboBoxText(validText) then MonthCalendar1.Visible:=True;
end;
procedure TForm1.ComboBox1KeyUp(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
if getComboBoxText(validText) then MonthCalendar1.Visible:=True;
end;