New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

vue2-timepicker

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue2-timepicker - npm Package Compare versions

Comparing version 0.2.0-beta.0 to 0.2.0-beta.2

CHANGELOG.md

23

package.json
{
"name": "vue2-timepicker",
"version": "0.2.0-beta.0",
"version": "0.2.0-beta.2",
"description": "A dropdown time picker (hour|minute|second) for Vue 2.x, with flexible time format support",
"scripts": {
"build": "vue-cli-service build --target wc --name vue-timepicker 'src/components/VueTimepicker.vue'"
"dev": "cd demo && yarn serve",
"dev:init": "cd demo && yarn install",
"build": "vue-cli-service build --target lib --name VueTimepicker ./src/index.js"
},
"main": "dist/vue-timepicker.min.js",
"main": "dist/VueTimepicker.common.js",
"css": "dist/VueTimepicker.css",
"repository": {

@@ -22,5 +25,2 @@ "type": "git",

],
"dependencies": {
"vue": "^2.6.10"
},
"devDependencies": {

@@ -34,4 +34,15 @@ "@vue/cli-plugin-babel": "^3.9.0",

"eslint-plugin-vue": "^5.0.0",
"vue": "^2.6.10",
"vue-template-compiler": "^2.6.10"
},
"peerDependencies": {
"vue": "^2.6.5"
},
"files": [
"dist/*",
"src/*",
"*.json",
"*.js",
"*.md"
],
"eslintConfig": {

@@ -38,0 +49,0 @@ "root": true,

@@ -5,4 +5,2 @@ # Vue2 Time Picker

> Looking for the Vue 1.x version? Please check the [vue-timepicker](https://github.com/phoenixwong/vue-timepicker) *(Vue 1.x supported)*
## Demo

@@ -18,9 +16,13 @@

[Vue.js](http://vuejs.org/) v2.0+
[Vue.js](http://vuejs.org/) v2.6.5+
## Installation
Through NPM **(Recommended)**
Through YARN or NPM **(Recommended)**
```bash
yarn add vue2-timepicker
```
```bash
npm install vue2-timepicker --save

@@ -39,32 +41,10 @@ ```

**A**: Include the single file component **(Recommended)**
```javascript
// import
// JS
import VueTimepicker from 'vue2-timepicker'
// Or, require
var VueTimepicker = require('vue2-timepicker')
// CSS
import 'vue2-timepicker/dist/VueTimepicker.css'
```
or, **B**: Include distribution files with `<script>` and `<style>`
```html
<script src="yourpath/vue/dist/vue.min.js"></script>
<script src="yourpath/vue2-timepicker/dist/vue2-timepicker.min.js"></script>
<link href="yourpath/vue2-timepicker/dist/vue2-timepicker.min.css" rel="stylesheet"></link>
```
**NOTE:** When using the `dist` files, a `Vue.use()` call is needed
```javascript
// Work with <script> block
Vue.use(window.VueTimepicker)
// Else
Vue.use(VueTimepicker)
```
**Step 2**: Include VueTimepicker in your component

@@ -112,13 +92,13 @@

**AM/PM** | A | AM PM
| a | am pm
&nbsp; | a | am pm
**Hour** | H | 0 1 ... 22 23
| HH | 00 01 ... 22 23
| h | 1 2 ... 11 12
| hh | 01 02 ... 11 12
| k | 1 2 ... 23 24
| kk | 01 02 ... 23 24
&nbsp; | HH | 00 01 ... 22 23
&nbsp; | h | 1 2 ... 11 12
&nbsp; | hh | 01 02 ... 11 12
&nbsp; | k | 1 2 ... 23 24
&nbsp; | kk | 01 02 ... 23 24
**Minute** | m | 0 1 ... 58 59
| mm | 00 01 ... 58 59
&nbsp; | mm | 00 01 ... 58 59
**Second** | s | 0 1 ... 58 59
| ss | 00 01 ... 58 59
&nbsp; | ss | 00 01 ... 58 59

@@ -252,11 +232,40 @@ > If not set, `format` string will be default to "HH:mm"

### Define Hour Range
Sometime you may want to limit hours picker to a specific range. The `hour-range` parameter is here to help.
```html
<vue-timepicker :hour-range="[5, [8, 12], [14, 17], 19]"></vue-timepicker>
```
Valid (selectable) hours in this example are: 5, 8, 9, 10, 11, 12, 14, 15, 16, 17, 19
### Hide Disabled Hour Ranges
```html
<vue-timepicker :hour-range="[5, [8, 12], [14, 17], 19]" hide-disabled-hours></vue-timepicker>
```
Paired with the above `hour-range` parameter. In this sample, the hour picker will hide the invalid hours (0, 1, 2, 3, 4, 6, 7, 13, 18, 20, 21, 22, 23) and display the valid hours (5, 8, 9, ...) only.
### Disable Picker
```html
<vue-timepicker disabled></vue-timepicker>
```
Used to disable dropdown picker and clear button in the UI. To prevent users from changing values again.
## Props API
Prop | Type | Required | Default Value
--------------------- | --------- | -------- | -------------
**v-model** | _Object_ | no | _undefined_
**format** | _String_ | no | "HH:mm"
**minute-interval** | _Number_ | no | _undefined_
**second-interval** | _Number_ | no | _undefined_
**hide-clear-button** | _Boolean_ | no | false
Prop | Type | Required | Default Value
----------------------- | --------- | -------- | -------------
**v-model** | _Object_ | no | _undefined_
**format** | _String_ | no | "HH:mm"
**minute-interval** | _Number_ | no | _undefined_
**second-interval** | _Number_ | no | _undefined_
**hide-clear-button** | _Boolean_ | no | false
**hour-range** | _Array_ | no | _undefined_
**hide-disabled-hours** | _Boolean_ | no | false
**disabled** | _Boolean_ | no | false

@@ -268,10 +277,13 @@ ## Contribution

```bash
# install dependencies
npm install
# Install dependencies
yarn install
# serve with hot reload at localhost:8080
npm run dev
# Init development dependencies
yarn dev:init
# Start developing. Serve with hot reload at localhost:8080
yarn serve
```
For detailed explanation on how things work, checkout the [webpack guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader).
For detailed explanation on how things work, checkout the [Vue Cli Guide](https://cli.vuejs.org/guide/).

@@ -278,0 +290,0 @@ ## Change Log

import VueTimepicker from './components/VueTimepicker'
module.exports = VueTimepicker
export default VueTimepicker

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc