简体   繁体   English

月日期范围选择器-Vue.js

[英]Month Date Range Picker - Vue.js

I'm looking for a library like bootstrap date-picker for Vue.js . 我正在寻找Vue.js的类似bootstrap date-picker的库。 But I need one where I can make some configuration like this one I'm using in a bootstrap daterange-picker 但是我需要一个我可以在bootstrap daterange-picker中使用的类似配置的地方

$('.input-daterange').datepicker({
         format: "mm/yyyy",
         language: "es",
         autoclose: true,
         startView: 1,
         minViewMode: 1
});

I have some example code here https://stackblitz.com/edit/js-jcldh8 我在这里有一些示例代码https://stackblitz.com/edit/js-jcldh8

I'm having some trouble using Vue js with this library so I hope someone can help me. 我在与此库一起使用Vue js时遇到了一些麻烦,所以希望有人可以帮助我。

Thanks. 谢谢。

I`m using element ui for Vue.js. 我正在为Vue.js使用元素ui。

https://element.eleme.io/#/en-US/component/date-picker https://element.eleme.io/#/zh-CN/component/date-picker

<el-date-picker
      v-model="birthdate"
      type="date"
      placeholder="Pick a Date"
      format="mm/yyyy"
      value-format="yyyy-MM-dd">
</el-date-picker>

There are so many libraries for Vue js that you can use easily like Element Ui, Vuetify etc. but you can use Element UI that is very easy to use and it has so many nice features like bootstrap. Vue js有很多库,您可以轻松使用它们,例如Element Ui,Vuetify等。但是您可以使用非常易于使用的Element UI,它具有许多不错的功能,例如引导程序。

you can install it by npm or use by cdn, see documentation here 您可以通过npm安装它或通过cdn使用它,请参阅此处的文档

and components date picker 和组件日期选择器

Calling Element Ui date picker: 调用Element Ui日期选择器:

    <el-date-picker
      v-model="value2"
      type="date"
      placeholder="Pick a day"
      :picker-options="pickerOptions1">
    </el-date-picker>

For Vuetify you can go here , it also can install in npm node or use cdn. 对于Vuetify,您可以转到此处 ,它也可以安装在npm节点中或使用cdn。

Vuetify date picker: Vuetify日期选择器:

<v-date-picker 
  v-model="picker" 
  :landscape="landscape" 
  :reactive="reactive">
</v-date-picker>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM