1.0.5 • Published 1 year ago

vuetify-time-range-picker v1.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

vuetify-time-range-picker

A time range picker based on Vuetify, made so users can easily pick a one day time interval.

Compatible with Vue 2 and Vuetify 2. If you need a Vue 3 and Vuetify 3 compatible version: check the upgraded version.

Demo

Installation

NPM

npm i vuetify-time-range-picker

YARN

yarn add vuetify-time-range-picker

Usage

Dependencies: Vue and Vuetify

JavaScript

// main.js
import Vue from 'vue';
import vuetify from '@/plugins/vuetify'; // path to vuetify export

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

// Component.vue
import TimeRangePicker from 'vuetify-time-range-picker';

export default {
  ...,
  components: {
    TimeRangePicker,
  },
};

HTML

<template>
  <v-app id="app">
    <time-range-picker
      v-model="range"
      full-width
      hide-details
      hide-selected
      outlined
      step="30"
    />
  </v-app>
</template>

Props

NameTypeDescriptionDefault Value
rangeObjectAn object used as v-model containing 'start' and 'end'{ start: '00:00', end: '23:59' }
inputLabelStringInput label text'Interval'
wholeDayLabelStringWhole day checkbox label text'Whole day'
stepString, NumberInterval of minutes between available times15
outerIconStringOuter vuetify v-icon default slot'access_time'
outerIconColorStringOuter vuetify v-icon color prop''
startAppendIconStringStart time append icon''
endAppendIconStringEnd time append icon''
startPrefixStringStart time prefix text''
endPrefixStringEnd time prefix text''
disabledTimesString, ArrayDisabled times for both inputs[]
innerDivCustomClassStringCustom CSS classes to be added at input's wrapper''
noInputSeparatorBooleanHides the separator between start and end inputfalse
hideWholeDayCheckboxBooleanHides whole day optionfalse
hideOuterIconBooleanHides outer v-iconfalse

Besides you can also pass most of the v-select props. The enabled ones are:

error-count error-messages full-width hide-details hint persistent-hint messages success-messages background-color color dark dense disable-lookup disabled eager error filled flat height hide-selected item-color light menu-props outlined rounded shaped solo solo-inverted success

Slots

NameDescription
appendReplaces the default v-icon outside the input

Events

NameDescription
updateUpdates the v-model value
mouseoverEmitted at input mouseover
mouseleaveEmitted at input mouseleave
focusEmitted at input focus
blurEmitted at input blur

License

MIT

1.0.5

1 year ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago