Customise the relative date time range options that are available in all time inputs.

Flagged Options

Default filter options

  today: false,
  past_1_day: true,
  yesterday: true,
  past_3_days: true,
  past_7_days: true,
  past_30_days: true,
  past_90_days: true,
  past_3_months: false,
  past_6_months: false,
  past_12_months: false,
  past_18_months: false,

How to change the default filter options:

    today: true,
  // ... other dashboard properties

Custom Options

const after = new Date('01/01/2000');
const before = new Date('01/01/2005');
    early_2000s: {
      description: 'Early 2000s',
      range: { after: after, before: before },
  // ... other dashboard properties

In the example, the key early_2000s is the ID of the filter option. This is how Vizzly will remember what relative filter has been selected. It is important that once set, this remains constant.

You will provide a description for what the filter is, and two dates to represent the time range that you want to be applied if the filter is selected.