All Projects → Owumaro → vue-date-range-picker

Owumaro / vue-date-range-picker

Licence: MIT license
A vue component using Bootstrap 4 styles for date range selection

Programming Languages

Vue
7211 projects
HTML
75241 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to vue-date-range-picker

Pd Select
vue components ,like ios 3D picker style,vue 3d 选择器组件,3D滚轮
Stars: ✭ 101 (+236.67%)
Mutual labels:  vue-components, datepicker
react-native-daterange-picker
A React Native component for picking date ranges or single dates.
Stars: ✭ 86 (+186.67%)
Mutual labels:  datepicker, daterange-picker
Vue Ui For Pc
基于Vue2.x的一套PC端UI组件,包括了Carousel 跑马灯、Cascader 级联、Checkbox 多选框、Collapse 折叠面板、DatePicker 日期选择、Dialog 对话框、Form 表单、Input 输入框、InputNumber 数字输入框、Layer 弹窗层、Loading 加载、Menu 菜单、Page 分页、Progress 进度条、Radio 单选框、SelectDropDown 仿select、Switch 开关、Table 表格、Tabs 标签页、Textarea 文本框、Tooltip 文字提示、BackTop 返回顶部、steps 步骤条、Transfer 穿梭框、Tree 树形、Upload 文件上传、Lazy 图片懒加载、Loading 加载、Pagination 分页等等
Stars: ✭ 156 (+420%)
Mutual labels:  vue-components, datepicker
Vue Persian Datetime Picker
A vue plugin to select jalali date and time
Stars: ✭ 380 (+1166.67%)
Mutual labels:  vue-components, datepicker
Heyui
🎉UI Toolkit for Web, Vue2.0 http://www.heyui.top
Stars: ✭ 2,373 (+7810%)
Mutual labels:  vue-components, datepicker
vue-drag-zone
Drag Zone component for @vuejs
Stars: ✭ 127 (+323.33%)
Mutual labels:  vue-components
vue-mui
Mobile UI elements for Vue 2.0
Stars: ✭ 16 (-46.67%)
Mutual labels:  vue-components
rails-vue-components-example
Ruby on Rails with vue.js single-file components example.
Stars: ✭ 20 (-33.33%)
Mutual labels:  vue-components
datepicker
A simple datepicker with Chakra-UI and date-fns
Stars: ✭ 140 (+366.67%)
Mutual labels:  datepicker
vue-link
One component to link them all 🔗
Stars: ✭ 65 (+116.67%)
Mutual labels:  vue-components
vue-authoring-template
Vue project template for authoring component and their use case
Stars: ✭ 14 (-53.33%)
Mutual labels:  vue-components
vectre
Most complete implementation of Spectre.css on Vue.js
Stars: ✭ 63 (+110%)
Mutual labels:  vue-components
BottomSheetTimeRangePicker
A tiny Android library for displaying a TimePicker with From and To ranges as a BottomSheetDialogFragment.
Stars: ✭ 60 (+100%)
Mutual labels:  range-selection
flatpickr-rails
This gem packages flatpickr's assets for drop-in use in Rails applications.
Stars: ✭ 29 (-3.33%)
Mutual labels:  datepicker
vue-on-rails
Easy way to mount/destroy Vue.js components with Ruby on Rails and Turbolinks 5
Stars: ✭ 17 (-43.33%)
Mutual labels:  vue-components
cuida
A design system built by Sysvale, using storybook and Vue components
Stars: ✭ 16 (-46.67%)
Mutual labels:  vue-components
vue-cli-plugin-quasar
Quasar Framework Vue CLI plugin
Stars: ✭ 66 (+120%)
Mutual labels:  vue-components
Oasis
🍃 UI framework based on [email protected]. (English document is coming soon)
Stars: ✭ 29 (-3.33%)
Mutual labels:  vue-components
silverware-calendar
SilverWare Calendar Module
Stars: ✭ 15 (-50%)
Mutual labels:  datepicker
vue3-docs
vue中文社区,vue3 中文文档
Stars: ✭ 180 (+500%)
Mutual labels:  vue-components

vue-date-range-picker

A vue component using Bootstrap 4 styles for date range selection

Vue-Treeselect Screenshot

Live demo (jsfiddle)

Features

  • Date range selection
  • Compare feature: select a second date range
  • No integration: DIY with your favorite vue components or js libraries
  • Bootstrap 4 styles (requires Bootstrap 4 CSS)
  • Returns Moment.js instances (requires moment.js)

Installation

npm install --save @owumaro/vue-date-range-picker

Usage

Webpack

JavaScript

// Import the component
import DateRangePicker from '@owumaro/vue-date-range-picker'

export default {
  // Register the component
  components: { DateRangePicker },
  
  // Create a method for the submit event
  methods: {
    updateRanges: function(range) {
      ...
    }
  },
  ...
}

HTML template

<date-range-picker v-on:submit="updateRanges" />

API

Events

As the component needs to transmit multiple values (startDate, endDate, compare, startDateCompare, endDateCompare), it can not use v-model.

Instead, it triggers 2 events:

  • submit: when the submit button is clicked; provides an Object argument with the 5 attributes mentioned above
  • cancel: when the cancel button is clicked

Props

Prop Type Default Description
calendar-count Number 2 Number of calendars to display
allow-compare Boolean true Enable/disable the comparison feature
ranges Object { currentMonth: { ... }, lastMonth: { ... } } Predefined ranges displayed in select menu(s)
default-range-select String currentMonth Key of the range to select by default
default-range-select-compare String lastMonth Key of the range to select by default (compare)

Development

Project setup

npm install

Compiles and hot-reloads for development

npm run serve

Compiles and minifies

npm run build

Inspiration

TODO

  • Tests
  • CSS without bootstrap dependency
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].