MonthCalendar control - get number of selected days?

  • Thread starter Thread starter james
  • Start date Start date
J

james

How can I get the number of selected days in the calendar? There are
properties for selectionstart, selectionend and also a selectionrange, but
nothing about count. I'd expect the selectionrange to have a count
sub-property, but it doesn't seem to.
James.
 
james said:
How can I get the number of selected days in the calendar? There are
properties for selectionstart, selectionend and also a selectionrange, but
nothing about count. I'd expect the selectionrange to have a count
sub-property, but it doesn't seem to.

Dim sr As SelectionRange = MyMonthCalendar.SelectionRange
Dim numDays As Integer = sr.End.Subtract(sr.Start).Days + 1
 
Larry said:
Dim sr As SelectionRange = MyMonthCalendar.SelectionRange
Dim numDays As Integer = sr.End.Subtract(sr.Start).Days + 1

Must... remember... to check... which... group... replying to...

SelectionRange sr = MyMonthCalendar.SelectionRange;
int numDays = sr.End.Subtract(sr.Start).Days + 1;
 
Larry Lard said:
Must... remember... to check... which... group... replying to...

SelectionRange sr = MyMonthCalendar.SelectionRange;
int numDays = sr.End.Subtract(sr.Start).Days + 1;

Thankyou - worked a treat!
James
 
Back
Top