Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(VTimePicker): control selecting mode with selecting #20677

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

J-Sek
Copy link
Contributor

@J-Sek J-Sek commented Nov 6, 2024

Description

New prop lets VTimePicker propagate access to current "selecting mode" and might open more possibilities (e.g. [1] not fully functional without #20200)

resolves #20671

Markup:

<template>
  <v-app>
    <v-container>
      <div class="d-flex justify-center ga-12"></div>
      <v-row class="justify-center ga-10" no-gutters>
        <v-card class="pa-6">
          <v-time-picker
            v-model="time"
            ampm-in-title
            use-seconds
            scrollable
            v-model:selecting="selecting"
          />
        </v-card>
        <v-card class="pa-6" width="300">
          <pre class="mb-6">value: <b>{{ time }}</b></pre>
          <v-radio-group v-model="selecting">
            <v-radio label="Hour" :value="1" />
            <v-radio label="Minute" :value="2" />
            <v-radio label="Second" :value="3" />
          </v-radio-group>
        </v-card>
      </v-row>
    </v-container>
  </v-app>
</template>

<script setup>
  import { ref } from 'vue'
  const time = ref('11:15')
  const selecting = ref(1)
</script>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request] Cannot set hour/minute/second state to time picker programmatically
1 participant