React-calendar-timeline: Restricting calendar timeline just for a day.

Created on 31 May 2018  路  5Comments  路  Source: namespace-ee/react-calendar-timeline

Is there a way though which I can restrict the calendar timeline only for a day? And the toggle cycles only through the day view and hour view.

Also, similar functionality for restricting a week?

What kind of issue are you experiencing?

  • [ ] Bug
  • [x] Feature Request
  • [x] Question
question

Most helpful comment

I'm into this.
I've set both minZoom and maxZoom to the same value (a month), assuming this would keep the view as "fixed".
Instead, the default view is not set to maxZoom, and when clicking the header renders a different range of time, ignoring minZoom.

My goal is to render a view only by month (and move on the calendar by month as well)

All 5 comments

Yep, you can likely do this using a few props:

visibleTimeStart and visibleTimeEnd - https://github.com/namespace-ee/react-calendar-timeline#visibletimestart-and-visibletimeend
minZoom - https://github.com/namespace-ee/react-calendar-timeline#minzoom
maxZoom - https://github.com/namespace-ee/react-calendar-timeline#maxzoom
timeSteps - https://github.com/namespace-ee/react-calendar-timeline#timesteps

With timeSteps, just specify 0 for the units you don't want to zoom to.

I meant, just for a day and not an entire month or a year.

So the max zoom you want is one day? You can use the min/maxZoom prop.

Here's a related bug to zoom though: https://github.com/namespace-ee/react-calendar-timeline/issues/279

Closing due to inactivity. If this issue is still not resolved, please post a comment and I'll reopen

I'm into this.
I've set both minZoom and maxZoom to the same value (a month), assuming this would keep the view as "fixed".
Instead, the default view is not set to maxZoom, and when clicking the header renders a different range of time, ignoring minZoom.

My goal is to render a view only by month (and move on the calendar by month as well)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fredrik-bjaras picture fredrik-bjaras  路  5Comments

neartik picture neartik  路  4Comments

elodszopos picture elodszopos  路  5Comments

capt-obvious picture capt-obvious  路  6Comments

riflemanIm picture riflemanIm  路  3Comments