【问题标题】:apply datepicker with bottom sheet vuetify应用带有底部工作表 vuetify 的日期选择器
【发布时间】:2018-03-22 03:57:33
【问题描述】:

我最近在使用 vuetify。我想用底页应用日期选择器。当用户聚焦输入字段时,日历将从底部打开。谁能帮我怎么做?

【问题讨论】:

    标签: vuejs2 vuetify.js


    【解决方案1】:

    为您的组件尝试以下代码。

    <template>
     <div class="text-xs-center">
      <v-bottom-sheet v-model="sheet">
       <v-text-field
         slot="activator"
         name="date"
         label="Date"
         id="date"
         v-model="date"
        ></v-text-field>
       <v-date-picker autosave style="" v-model="date"></v-date-picker>
      </v-bottom-sheet>
     </div>
    </template>
    <script>
    export default {
      data () {
        return {
           date:'',
           sheet:null,
        }
      },
    }
    </script>
    <style>
      .dialog{
        background:white;
        justify-content:center; 
        display:flex
      }
    </style>
    

    如果您需要任何东西,请告诉我:)

    【讨论】:

    • 感谢您的回复。我想到了。但我还有一个问题。我正在为 vuejs 组件寻找 ios 类型的 datepicker。你能帮帮我吗?
    猜你喜欢
    • 2019-07-27
    • 2021-09-24
    • 2020-04-13
    • 1970-01-01
    • 2021-12-19
    • 2019-07-05
    • 2018-06-27
    • 1970-01-01
    • 2014-07-21
    相关资源
    最近更新 更多