TDBPLanner - mode plDay -> add item : from EncodeDate(2021, 5, 10) to EncodeDate(2021, 5, 13)

Hello,
My planner is on mode plDay.
In the header i've got : monday 10/05, tuesday 11/05,...
And then on the side bar 07:00, 07h30,...

I've have an item 10/05 from 10:00 to 13:00
But i want to create an item in the header : from 10/05 to 13/05
Is it possible ?

Regards

Bertrand

In the event DBDaySource.OnFieldsToItem, set Item.InHeader = true for this specific item you want in the header.

Hello Bruno,

procedure TCalendarPerClass.DBDaySourceFieldsToItem(Sender: TObject; Fields: TFields; Item: TPlannerItem);
begin
  if ibqry_getHorairesDays.FieldByName('ID').AsString = '36148' then
  begin
    Item.InHeader := True;
    //Item.ItemEndTime := EncodeDateTime(2021, 5, 12, 7, 0, 0, 0);
    //Item.ItemEndTime := EncodeDateTime(2021, 5, 13, 12, 0, 0, 0);
    Item.ItemEndTime := EncodeDate(2021, 5, 12);
    Item.ItemEndTime := EncodeDate(2021, 5, 13);
  end;

Okay the item is in the header, but i can't set it on 2 days
From 12/05/2021 to 13/05/2021

It's a calendar to display the schedule of a teacher and the teacher's sick days in the header

Regards

Bertrand

When there is an event that is for multiple days and needs to be shown in the header on multiple days, then multiple header events will need to be created.
To what start and end date do you set this in the database, as when these are full day items, these should normally automatically be added to the header on each day where it occurs?

Okay, next step, the item seems to be separate day per day
Is it possible that the item cross the calendar ?

Thanks Bruno

Sorry, that is unfortunately not possible
It's also non trivial as the position of an item on day X can be different from an item on day X+1

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.