vuetifyjs/vuetify · error · Error

No dates found using specified start date, end date, and wee

Error message

No dates found using specified start date, end date, and weekdays.

What it means

Thrown by createDayList() when, after iterating from start to end while respecting weekdaySkips, zero days were collected. weekdaySkips is a length-7 array (one entry per weekday 0-6) where 0 means 'skip this weekday'. If every weekday in the range is skipped, or max is 0/min forces nothing, days stays empty.

Source

Thrown at packages/vuetify/src/components/VCalendar/util/timestamp.ts:457

  if (stop < getDayIdentifier(start)) {
    throw new Error('End date is earlier than start date.')
  }

  while ((!stopped || days.length < min) && days.length < max) {
    currentIdentifier = getDayIdentifier(current)
    stopped = stopped || currentIdentifier === stop
    if (weekdaySkips[current.weekday] === 0) {
      current = nextDay(current)
      continue
    }
    const day = copyTimestamp(current)
    updateFormatted(day)
    updateRelative(day, now)
    days.push(day)
    current = relativeDays(current, nextDay, weekdaySkips[current.weekday])
  }

  if (!days.length) throw new Error('No dates found using specified start date, end date, and weekdays.')

  return days
}

export function createIntervalList (
  timestamp: CalendarTimestamp,
  first: number,
  minutes: number,
  count: number,
  now?: CalendarTimestamp
): CalendarTimestamp[] {
  const intervals: CalendarTimestamp[] = []

  for (let i = 0; i < count; i++) {
    const mins = first + (i * minutes)
    const int = copyTimestamp(timestamp)
    intervals.push(updateMinutes(int, mins, now))
  }

View on GitHub (pinned to 8d153908df)

Solutions

  1. Ensure at least one weekday in the [start,end] range has a non-zero entry in weekdaySkips.
  2. Check the `weekdays` prop on VCalendar — it must include at least one weekday present in the range.
  3. Pass max > 0 (default is 42) so the loop can collect days.
  4. Widen the start/end range or relax the weekday filter.

Example fix

// before
const days = createDayList(start, end, now, [0,0,0,0,0,0,0]) // throws

// after
// enable Mon-Fri (weekdaySkips built from weekdays prop)
const days = createDayList(start, end, now, [0,1,1,1,1,1,0])
Defensive patterns

Strategy: validation

Validate before calling

function buildSkips(weekdays: number[]): number[] {
  const skips = [0,0,0,0,0,0,0]
  for (const wd of weekdays) skips[wd] = 1
  if (!skips.some(Boolean)) {
    throw new Error('At least one weekday must be enabled')
  }
  return skips
}

Type guard

function hasEnabledWeekday(weekdaySkips: number[]): boolean {
  return weekdaySkips.some(s => s > 0)
}

Try / catch

try {
  return createDayList(start, end, now, skips)
} catch (e) {
  if (e instanceof Error && /No dates found/.test(e.message)) {
    return [] // render empty state
  }
  throw e
}

Prevention

When it happens

Trigger: Passing weekdaySkips that is all zeros (no weekdays enabled), passing a single-day range where that weekday is disabled, or passing max=0. Also happens if weekdaySkips is misaligned with the weekday numbering so all hits land on skipped days.

Common situations: A VCalendar configured with `weekdays` that excludes every day actually present in the range (e.g. a weekday-only calendar [1,2,3,4,5] pointed at a weekend range), an empty `weekdays: []` prop producing all-zero skips, or a custom interval/visible-days config that sets max too low.

Related errors


AI-assisted analysis of vuetifyjs/vuetify@8d153908df (2026-08-12). Data as JSON: /api/errors/78b4543bfc90fa5b. Report an issue: GitHub.