1.0.4 • Published 5 years ago

vue-timepiece v1.0.4

Weekly downloads
1
License
ISC
Repository
-
Last release
5 years ago

Vue Timepiece

A time picker (year|day|hour|minute|second) for Vue 2.x, with flexible time format support.

Demo

You can see the Vue2 Timepicker in action in the Demo Page

Github

On click go to github for basic guidelines.

Dependencies

Vue.js v2.0+

Installation

Through NPM (Recommended)

npm install vue-timepiece --save

Bower

bower install vue-timepiece --save

Get Started

Step 1: Import vueTimepiece

A: Include the single file component (Recommended)

// import
import vueTimepiece from 'vue-timepiece'

// Or, require
var vueTimepiece = require('vue-timepiece')

Step 2: Include VueTimepicker in your component

var yourComponent = new Vue({
  components: { vueTimepiece },
  ...
})

Step 3: Then, you can introduce the vue-timepicker tag anywhere you like in your component's template

Usage

Basic Usage

<!-- Default to 24-Hour format HH:mm -->
<vue-timepicker :doStart="doStart"></vue-timepicker>

Customized Time Format

<!-- Show seconds picker -->
<vue-timepicker format="hh:mm:ss"></vue-timepicker>

VueTimepicker will recognizes the following tokens in the format string

SectionTokenOutput
Yearyy01 02 ...
MonthMM01 02 ... 11 12
Daydd01 02 ... 29 30
Hourhh01 02 ... 11 12
Minutemm00 01 ... 58 59
Secondss00 01 ... 58 59

If not set, format string will be default to "hh:mm:ss"

## Props API

Prop                  | Type      | Required | Default Value
--------------------- | --------- | -------- | -------------
**doStart**           | _Boolean_ | yes      | false
**format**            | _String_  | no       | "hh:mm:ss"
**showTimeString**    | _Boolean_ | no       | true

## Function API

Function Name         | Return
--------------------- | ---------
**finishTime**        | Time String

## Contribution

Please feel free to fork and help developing.

## License

[ISC]
1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago