Page 1 of 1
[INFO REQ]
Posted: Thu Dec 08, 2022 7:12 pm
by filipirafael
Hello everyone, everything good?
I didn't understand in the documentation how I can configure the timeline to show only 4 weeks or 3 months, for example.
My scheduler is configured as per the following code:
scheduler.viewPreset = 'dayAndMonth';
I just need to configure it to show only three months or in case the viewPreset is "weekAndDayLetter", show only four weeks, you know?
Thank you very much!
Re: [INFO REQ]
Posted: Mon Dec 12, 2022 3:40 pm
by filipirafael
Hi everyone, do you need any more information?
Re: [INFO REQ]
Posted: Tue Dec 13, 2022 11:13 am
by johan.isaksson
Hi,
Sorry for the delayed response.
You can control the time the schedule spans by assigning to scheduler.startDate
or scheduler.endDate
, or by calling scheduler.setTimeSpan(start, end)
(https://bryntum.com/products/scheduler/docs/api/Scheduler/view/Scheduler#function-setTimeSpan)
If you want to set a specific span for a certain preset, you could listen for the presetChange
event (https://bryntum.com/products/scheduler/docs/api/Scheduler/view/Scheduler#event-presetChange) and adjust the span in your listener.
You could also take a look at the ViewPresetCombo (https://bryntum.com/products/scheduler/docs/api/Scheduler/widget/ViewPresetCombo). It supports presets with start
and end
specified. See for example the drag-batches
demo: https://bryntum.com/products/schedulerpro/examples/drag-batches/
Re: [INFO REQ]
Posted: Tue Dec 13, 2022 9:22 pm
by filipirafael
It works now, thaks a lot Johan!