I added a line in TCalDrawer.DrawTopRow to fix the display of RightToLeft Month/Day.
procedure TCalDrawer.DrawTopRow;
var r: TRect;
s: string;
begin
if (FCanvas.Font.Color <> FOwner.Colors.TextColor) then
FCanvas.Font.Color:= FOwner.Colors.TextColor;
if (coBoldTopRow in FOwner.Options) then
FCanvas.Font.Style := [fsBold]
else
FCanvas.Font.Style := [];
case FOwner.BiDiMode = bdLeftToRight of
False: begin
r:= GetCellAtColRow(7, 1); DrawArrow(r, ahDouble, adLeft);
r:= GetCellAtColRow(6, 1); DrawArrow(r, ahSingle, adLeft);
r:= GetCellAtColRow(1, 1); DrawArrow(r, ahDouble, adRight);
r:= GetCellAtColRow(2, 1); DrawArrow(r, ahSingle, adRight);
r:= GetCellAtColRow(5, 1);
s:= IntToStr(FThisYear) + ' ' + FOwner.FMonthNames[FThisMonth];
end;
True: begin
r:= GetCellAtColRow(1, 1); DrawArrow(r, ahDouble, adLeft);
r:= GetCellAtColRow(2, 1); DrawArrow(r, ahSingle, adLeft);
r:= GetCellAtColRow(7, 1); DrawArrow(r, ahDouble, adRight);
r:= GetCellAtColRow(6, 1); DrawArrow(r, ahSingle, adRight);
r:= GetCellAtColRow(3, 1);
s:= FOwner.FMonthNames[FThisMonth] + ' ' + IntToStr(FThisYear);
end;
end;
s:= FOwner.FMonthNames[FThisMonth] + ' ' + IntToStr(FThisYear); //<<< Added by Avishai
FCanvas.TextRect(r, 0, 0, s, FTStyle);
end;