vue-simple-timepicker
v1.0.2
Published
simple time picker
Downloads
257
Maintainers
Readme
vue-timepicker
Simple vue timepicker
Screenshot
Future
- Usage props for options the timepicker
- Switch AM/PM time
- update styles
Install
npm i vue-simple-timepicker --save
Usage
<template>
<div id="app">
<Timepicker v-model="timepicker" :options="pickerSetting"></Timepicker>
<!-- View time -->
<div>
{{ timepicker.hours }} : {{ timepicker.minutes }}
</div>
</div>
</template>
<script>
import Timepicker from 'vue-simple-timepicker';
export default {
name: 'app',
components: {Timepicker},
data() {
return {
timepicker: {
hours: 0,
minutes: 0,
},
pickerSetting: {
headerShow: false,
},
}
}
};
</script>
Options
Default Options:
options : {
headerShow: true, /* Show/Hide Header */
headerText: 'Friday Time Picker' /* Text Header a Picker */
};
Usage Custom options:
<Timepicker :options="pickerSetting">
To use the settings you need to send them to the component as shown above
Custom trigger:
<Timepicker :options="pickerSetting">
<div>Click for show timepicker!</div>
</Timepicker>