Hi, please find attached updated app.
As I mentioned, I have a requirement to implement 'today', 'current week' (including today), 'current month' (including today), 'current year' (including today) views.
(If user selects a view then gantt should show appropriate timerange)
How I implemented it? I change viewPreset programmatically - to reproduce click buttons 'd', 'w', 'm', 'y' above the gantt.
First question - is it correct approach to do like this? Maybe I should use totally different approach?
If approach is ok, when I change viewPreset then gantt shows 'day', 'week', 'month', 'year' view, but not current
I asked how to show current. marcio answered that I should use setTimeSpan function.
I asked what event should I listen to to apply setTimeSpan after viewPreset change. You answered dateRangeChange event.
But it's NOT triggered after viewPreset changed programmatically
How to reproduce in attached app:
- click 'd', 'w', 'm', 'y' buttons above the gantt -> viewPreset is changed, but event is not triggered.
Could you please check and tell what I do wrong?