Skip to content
This repository was archived by the owner on Oct 20, 2020. It is now read-only.
This repository was archived by the owner on Oct 20, 2020. It is now read-only.

Feature/Help needed: Hide specific columns #137

Description

@ioncodes

I'm using this to create a timeline based on weeks and days:

image

I used the following code to create the cells:

export const buildWeekCells = () => {
  const v = []
  for (let i = 0; i < 52; i += 1) {
    const week = moment().startOf('year').weekday(1).add(i, 'week')

    v.push({
      id: `w${i}`,
      title: `W${i}`,
      start: week.toDate(),
      end: week.add(1, 'week').subtract(2, 'day').toDate(),
    })
  }

  return v
}

export const buildDayCells = () => {
  const v = []
  for (let i = 0; i < 365; i += 1) {
    const day = moment().startOf('year').weekday(7).add(i, 'day')

    if (day.weekday() !== 6 && day.weekday() !== 0) {
      v.push({
        id: `d${i}`,
        title: day.toString()[0],
        start: day.toDate(),
        end: day.add(1, 'day').toDate(),
      })
    }
  }

  return v
}

I couldn't find a way to hide specific columns (in my case the weekends). This could be very useful. Any ideas on how to implement this?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions