Page 1 of 1

shifted week

PostPosted: 22 Aug 2016 14:34
by assapan
Hi,
My customers wanted to have the current day shifted in week , i mean current day have to be first or second column and other days are on right side .
So i did modification on JQSchedulerOptions.WeekStartDay to represent D-Day or D-Day - 2 or D-Day - 1 ( In French J , J -1 , J - 2) , in order to do so i had to modify source code of function TIWCGJQCustomScheduler.GetData
Code: Select all
    svWeek:
    begin
      D:= DayOfTheWeek(AShowDate);
       AStartDate:= AShowDate;

      while D<>JQSchedulerOptions.WeekStartDay do begin
        dec(D);
        if D<0 then
          D:=6;
         AStartDate:= IncDay(AStartDate,-1);

      end;


      AEndDate:= IncDay(AStartDate,6);
    end;


BUT by handling the same variable for (WeekStartDay ) for month view , i have to modify WeekStartDay before changing to month view which is acceptable for me..

a video of demo
http://assapan.fr/schedulermodified.mp4