I have a powershell calendar that allows a selection range of dates. The MaxDate property is set as the current day. The issue I am having is that I can select today's date but not as part of the range. I can select multiple dates but as soon as I include today's date in the selection it selects only today's date. The issue is likely the MaxDate property because if I remove it I can select today's date as part of the range, but I don't want to do that because that will allow selection for days in the future. Any ideas how to add today's date and allow it to be part of the selected range? The code is below. Thanks.
$Calendar = New-Object System.Windows.Forms.MonthCalendar
$Calendar.Location = New-Object System.Drawing.Size(10,80)
$Calendar.ShowTodayCircle = $False
$Calendar.MaxDate = Get-Date
$Calendar.MinDate = $OldestLog
$Calendar.MaxSelectionCount = "365"
$MenuBox.Controls.Add($Calendar)