Our pure JavaScript Scheduler component


Post by sanid »

Hi guys,

I am displaying Week view for the customers and Tasks are looking too narrow.
Especialy those that have 1Hour duration...15px of with.

Solution is setting visible workingTime config 8-17h to get tasks look a bit longer, but when I set workingTime property I get error:
Invalid time axis configuration or filter, please check your input data.

Question now is do I need to change input data as well or normal events with startDate and endDate can work with this new workingTime config?

myconfig object is:

workingTime = {
    fromHour : 8,
    toHour   : 17
  };
  
<bry-scheduler 
   ...
[workingTime]="workingTime"
</bry-scheduler>

Thanks :)


Post by Maxim Gorkovsky »

Hello.
You can see this message when time axis cannot create any time ranges between configured start and end. Could you please provide more details like view preset, start, end, scheduler size?


Post by sanid »

Config:

 viewPresetWeek = {
    base: 'hourAndDay',
    id: 'viewPresetWeek',
    defaultSpan: 7,
    headers: [
      {
        unit: 'day',
        increment: 1,
        dateFormat: 'dd'
      },
      {
        unit: 'hour',
        increment: 24,
        dateFormat: 'DD',
        headerCellCls: 'header-day-column'
      }
    ]
  };

startDate = Date object -> 12.07.2021
endDate = Date object -> 19.07.2021

Scheduler is showing 7 day view.

Unbenannt.PNG
Unbenannt.PNG (23.25 KiB) Viewed 420 times

TaskModel = {
startDate: "2021-7-13 13:15"
endDate: "2021-7-13 15:15"
...
}

Does multiday Tasks colide with workingHour config?


Post by Maxim Gorkovsky »

Problem is with view preset definition. Here you define lower lever header rendering 24 hours:

{
    unit          : 'hour',
    increment     : 24,
    dateFormat    : 'DD',
    headerCellCls : 'header-day-column'
}

In combination with workin hours that creates an empty tick. Try setting increment to 1 hour. Or define your own customized tick generator: https://bryntum.com/docs/scheduler/#Scheduler/data/TimeAxis#function-generateTicks


Post by sanid »

Just to confirm that this approach works.
In my case problem was second header Column config in Weekview.

  viewPresetWeek = {
    base: 'hourAndDay',
    id: 'viewPresetWeek',
    defaultSpan: 7,
    headers: [
      {
        unit: 'day',
        increment: 1,
        dateFormat: 'dd'
      },
      {
        unit: 'day',
        increment: 1,
        dateFormat: 'DD',
        headerCellCls: 'header-day-column'
      }
    ]
  };

Many thanks :)


Post Reply