This works fine for me, and displays the dates properly. (Note: there is no error handling for parsing errors or out of range dates! This is strictly designed to show the use of the array of DateTime
with MonthCalendar.BoldedDates
in Delphi Prism.)
method MainForm.button2_Click(sender: System.Object; e: System.EventArgs);
var
Dt: array of System.DateTime;
TheSize: Int32;
begin
TheSize := Int32.Parse(textBox1.Text);
Dt := new System.DateTime[TheSize];
for i: Int32 := 0 to TheSize - 1 do
Dt[i] := new DateTime(2012, 11, i + 4);
monthCalendar1.BoldedDates := Dt;
end;
A test entering 5
in the textbox shows this result: