TPlannerMonthView questions

Three quick questions:

1) How can I check if the selected date is within the 'active' date range?

2) How is the date Selection (highlighted date) not displayed on initial display as well as when the user cycles thru the months (for example current day on month is 15th April, and when navigate forward to May the selected day is 15th May).

3) Can the Navigation buttons be changed, resized or repositioned?

Thanks.


1) How can I check if the selected date is within the 'active' date range?

I am not sure what you mean with "active" date range.
The selected date can be retrieved with:  plannermonthview.Date

2) How is the date Selection (highlighted date) not displayed on initial display as well as when the user cycles thru the months (for example current day on month is 15th April, and when navigate forward to May the selected day is 15th May).

There is always a selected day displayed. 

3) Can the Navigation buttons be changed, resized or repositioned?

You can change the navigation buttons via PlannerMonthview.Glyphs
They cannot be repositioned though.

Thank you for your reply.


Item #1: What I mean by 'active' date range is say the MinDate is set to 20-Jun-2010 and MaxDate to 25-Jun-2010, and the user clicks on a cell for a 'disabled' date, say '10-Jun-2010'. The DaySelect even is triggered. Is there a function or procedure (boolean T/F) to check if the 'selDate' (Selected Date) is within the 'active' date range?

Item#2: I set the selection color to the same color as the planner so though it is 'selected' it is not visible to the user.

Item #3: I'll modify via the Glyph as suggested. 


You could compare the selected date with the min/max date ,ie:

valid = (seldate >= mindate) and (seldate <= maxdate)

Thanks. I tried that but made an error and had the selDate in the wrong position on one side.

Here it is:

          validDate := (SelDate >= MinDate.Date) and (SelDate <= MaxDate.Date);
          if validDate then
             MessageDlg ('selDate in .Dates', mtInformation, [mbOK], 0)
          else
              MessageDlg ('selDate NOT in .Dates', mtInformation, [mbOK], 0);