Planner Question: Programmatically select cells by StartTime/EndTime

Looking at the doc and having trouble figure this out.

All I need to do is to be able to programmatically select a range of cells based upon a range of times, starttime to endtime.

Hi,

You can to this by using the following code:

var
  c1, c2: TTMSFNCPlannerCell;
begin
  c1 := TMSFNCPlanner1.DateTimeToCell(Int(Now) + EncodeTime(19, 0, 0, 0));
  c2 := TMSFNCPlanner1.DateTimeToCell(Int(Now) + EncodeTime(21, 0, 0, 0));
  TMSFNCPlanner1.SelectCells(c1, c2);

Thanks for that.

Maybe I have an older version. That doesn't quite work. I needed to do this:

var C1 : TTMSFNCPlannerCell;
C2 : TTMSFNCPlannerCell;
begin
c1 := planNVMS.DateTimeToCell(AStartTime);
c2 := planNVMS.DateTimeToCell(AEndTime);
c2.Row := C2.Row - 1;
planNVMS.SelectCells(c1, c2);

Strange, can you show us the selection in the planner? When using DateTimeToCell, note that TDateTime value needs to match the values you want to select. When executing the code snippet we posted. We get the following selection, which is correct:

image

Can you send us a sample?
We have been testing this on several setups and cannot reproduce the issue.