As already, mentioned in comments and the answer only styles normal and bold
can used. With TYearBoldManager
you can implement that.
only set March 30,31 and April 1,2,3,4
Tested : Delphi5 on win XP/3
minDate = 2015/03/30
and maxDate = 2015/04/04
you can set the bold
dates with
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;
Then you should change the color values to get the best possible contrast. Here are just a suggestion.


to Test there are 4 files here , MonthCalendarDemo
Update :
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.
Look at UMonthBoldStorage.pas
how it's done.
What is the difference here ?

The experts have recognized it.
to the right TDateTimePicker
on the left a TMonthCalendar
and a TComboBox
Advantage:
- No min- maxDate needed
- can have
days without logfile
.
- full control over the calendar.
- bold days are easy to use
- can see where you clicked (Look at the nice dotted border at
25
. But has no effect on the calendar).
- no disappear if you click on the wrong date.(can click as much as you want , calendar will only disappear when you double-click on bold days. here : days 20 and 22).

- can click inside the
TComboBox
or on the down-arrow
or when focused hit ENTER
opens the calendar and brings you to the last date with a logfile.


- from there you can comfortably, with the arrow keys, the months with days that have a logfile go through.

all described could be accomplished with a few lines additional code
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;