Our pure JavaScript Scheduler component


Post by Aniket »

Team,
I have 2 buttons on which I call zoomIn and zoomOut methods respectively.

and I have a calendar preset as below

this.viewPreset = {         // populate the calendar
      base: 'dayAndWeek',
      tickHeight: 20,
      tickWidth: 16,

  headers: [
    {
      unit: 'week',
      dateFormat: 'MMM YYYY',
    },
    {
      unit: 'day',
      dateFormat: 'D',
    },
    {
      unit: 'day',
      dateFormat: 'd1',
    },
  ],
};

However, when I click zoomIn the view enlarges but does not switches back to its original view on click of ZoomOut.

The timeline of the calendar keeps on increasing.

Any thoughts


Post by saki »

There is one Angular demo that implements zoomIn and zoomOut buttons. You can read the sources of the demo and compare it with your implementation.

Technically, zooming is selecting one view preset from the presets store. The available presets therefore influence the zooming behavior.

If you still cannot make it working, provide please a runnable showcase. The ideal showcase is one of our examples modified to show the issue.


Post Reply