1.0.0 • Published 3 years ago

@moirei/vuetify-time-range-picker v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

vuetify-time-range-picker

Similar to v-time-picker, this components allows you to visually select time ranges.

Demo Video

demo

Installation

npm i --save @moirei/vuetify-time-range-picker
# or yarn add @moirei/vuetify-time-range-picker

Usage

<template>
  <v-time-range-picker v-model="time"/>
</template>

Component

import { VTimeRangePicker } from '@moirei/vuetify-time-range-picker'

export default {
  components: { VTimeRangePicker },
  data: () => ({
    time: null,
  })
}

Plugin

import Vue from 'vue'
import VTimeRangePicker from '@moirei/vuetify-time-range-picker'
Vue.use(VTimeRangePicker)

new Vue({}).$mount('#app')

export default Vue.extend({
  data: () => ({
    time: null,
  })
})

API

props

NameRequired?DefaultTypeDescription
valueyesstringThe v-model input prop
allowed-hoursnofunction/arrayRestricts which hours can be selected
allowed-minutesnofunction/arrayRestricts which minutes can be selected
allowed-secondsnofunction/arrayRestricts which seconds can be selected
ampm-in-titlenofalsebooleanPlace AM/PM switch in title, not near the clock.
colornostringApplies specified color to the control - it can be the name of material color (for example success or purple) or css color (#033 or rgba(255, 0, 0, 0.5)).
darknofalsebooleanApplies the dark theme variant to the component.
elevationnostring/numberDesignates an elevation applied to the component between 0 and 24.
formatno24hrstringDefines the format of a time displayed in picker. Available options are ampm and 24hr.
header-colornostringDefines the header color. If not specified it will use the color defined by color prop or the default picker color.
heightnostring/numberSets the height for the component.
landscapenofalsebooleanOrients picker horizontal.
lightnofalsebooleanApplies the light theme variant to the component.
max-heightnostring/numberSets the maximum height for the component.
max-widthnostring/numberSets the maximum width for the component.
min-heightnostring/numberSets the minimum height for the component.
min-widthnostring/numberSets the minimum width for the component.
no-titlenofalsebooleanHide the picker title.
outlinednofalsebooleanRemoves elevation (box-shadow) and adds a thin border.
readonlynofalsebooleanPuts picker in readonly state.
roundednofalsebooleanDesignates the border-radius applied to the component.
shapednofalsebooleanApplies a large border radius on the top left and bottom right of the card.
scrollablenofalsebooleanAllows changing hour/minute with mouse scroll.
tagnodivstringSpecify a custom tag used on the root element.
tilenofalsebooleanRemoves the component’s border-radius.
use-secondsnofalsebooleanToggles the use of seconds in picker.
widthnostring/numberSets the width for the component.

events

NameDescription
inputThe v-model input event

classes

NameDescription
v-time-rangeThe components class

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Changelog

Please see CHANGELOG.

Credits

License

MIT