Planner Start Date?


I have gone through the developers' guide several times and can't find the answer to this.

I have a TDBPlannerCalendar on a form, along with a page control that has 3 tabs. The first 2 tabs have a TDBPlanner each to display day view and week view respectively.  The 3rd tab has a TDBPlannerMonthView.

How do I programmatically set the start date for each of the planners?  For example, I want to set the day view to today's date, and the week view to start from the first day of whatever week is selected.

For the month planner I'm doing it like this:

procedure TfrmMain.CalendarDaySelect(Sender: TObject; SelDate: TDateTime);
    DayPlanner.Caption.Title := FormatDateTime(FFormatSettings.LongDateFormat, SelDate);
    MonthPlanner.Day := DayOf(SelDate);
    MonthPlanner.Month := MonthOf(SelDate);
    MonthPlanner.Year := YearOf(SelDate);


= Steve

I assume your TDBPlanner instances are connected to a TDBxxxSource component.

As such, the viewed time axis on the TDBPlanner is controlled by the TDBxxxSource component settings.
For TDBPlannerMonthView, this is controlled by TDBPlannerMonthView.Month / TDBPlannerMonthView.Year
Hi Bruno,

Thanks for the quick reply.

Should I be using TDBDaySource for the day view and TDBWeekSource for the week view, or should I be using TDBPeriodSource?


= Steve

If you want a hour/minute based time-axis during a day, the TDBDaySource should be used.

Not sure what exact time-axis view you expect for the other modes.
This is what I'm trying to do:

The first two look like a multiday/multiresource variations both to be handled with a TDBDaySource.

Ok, thanks Bruno. I'll give that a try.

= Steve