Skip to content

feat(VCalendar): add interval-highlight prop#22885

Merged
J-Sek merged 1 commit into
devfrom
feat/vcalendar-interval-highlight
Jun 1, 2026
Merged

feat(VCalendar): add interval-highlight prop#22885
J-Sek merged 1 commit into
devfrom
feat/vcalendar-interval-highlight

Conversation

@J-Sek

@J-Sek J-Sek commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

resolves #22593

  • new interval-highlight accepting boolean and color string

Markup:

<template>
  <v-app theme="dark">
    <v-container fluid>
      <div class="d-flex ga-4 mb-4" style="max-width: 460px">
        <v-select
          v-model="type"
          :items="types"
          label="Calendar type"
        />
        <v-select
          v-model="highlight"
          :items="highlights"
          label="Interval highlight"
        />
      </div>
      <VCalendar
        :categories="categories"
        :events="events"
        :first-interval="6"
        :interval-count="14"
        :interval-height="48"
        :interval-highlight="highlight"
        :interval-width="80"
        :type="type"
        event-color="red"
      />
    </v-container>
  </v-app>
</template>

<script>
  import { shallowRef } from 'vue'

  export default {
    name: 'Playground',
    setup () {
      const type = shallowRef('week')
      const types = ['month', 'week', 'day', '4day', 'category']

      const highlight = shallowRef('primary')
      const highlights = [
        { title: 'true (surface-variant)', value: true },
        { title: 'false (off)', value: false },
        'primary',
        'secondary',
        'success',
        '#ffcc11',
      ]

      const categories = [
        { categoryName: 'John' },
        { categoryName: 'Jane' },
        { categoryName: 'Bob' },
        { categoryName: 'Alice' },
        { categoryName: 'Charlie' },
      ]

      const events = [
        { name: 'Meeting', start: '2026-06-01 09:00', end: '2026-06-01 10:00', category: 'John' },
        { name: 'Lunch', start: '2026-06-01 12:00', end: '2026-06-01 13:00', category: 'Jane' },
        { name: 'Review', start: '2026-06-01 14:00', end: '2026-06-01 15:30', category: 'Bob' },
        { name: 'Standup', start: '2026-06-01 09:30', end: '2026-06-01 10:00', category: 'Alice' },
        { name: 'Workshop', start: '2026-06-01 15:00', end: '2026-06-01 17:00', category: 'Charlie' },
      ]

      return {
        type,
        types,
        highlight,
        highlights,
        categories,
        events,
      }
    },
  }
</script>

@J-Sek J-Sek self-assigned this Jun 1, 2026
@J-Sek J-Sek added T: feature A new feature C: VCalendar labels Jun 1, 2026
@J-Sek J-Sek linked an issue Jun 1, 2026 that may be closed by this pull request
@J-Sek J-Sek marked this pull request as ready for review June 1, 2026 21:43
@J-Sek J-Sek merged commit 4b1b720 into dev Jun 1, 2026
17 checks passed
@J-Sek J-Sek deleted the feat/vcalendar-interval-highlight branch June 1, 2026 21:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request] VCalendar Category View Highlighted Time

1 participant