Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/HC200ok/vue-easy-range-date-picker

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/HC200ok/vue-easy-range-date-picker

  • v0.0.0-20220529050511-fea9a8328dca
  • Source
  • Go
  • Socket score

Version published
Created
Source

vue-easy-range-date-picker

A simple and easy-to-use range date picker based on Vue2

Installation

npm install --save vue-easy-range-date-picker

Usage

<template>
  <RangeDatePicker v-model="dates"/>
</template>

<script>
import RangeDatePicker from 'vue-easy-range-date-picker';

export default {
  components: {
    RangeDatePicker,
  },
  data() {
    return {
      dates: {
        start: 1572879600000,
        end:  1575730800000
      },
    };
  },
}
</script>

Demo

Edit on CodeSandbox

Props

PropsTypeRequiredDefault
v-model(1)Objectyesnull
language(2)Stringno'zh'
colorToday(3)Stringno'#41b883'
colorSelected(3)Stringno'#34495e'
colorActive(3)Stringno'#41b883'

(1) v-model: Binding an object which contains start timestamp and end timestamp:

// example
dates: { 
  start: 1573052400000,
  end: 1574434800000
}

you can also pass an empty object as the default value like this:

<template>
  <RangeDatePicker v-model="dates"/>
</template>

<script>
import RangeDatePicker from 'vue-easy-range-date-picker';

export default {
  components: {
    RangeDatePicker,
  },
  data() {
    return {
      dates: {},
    };
  },
}
</script>

Edit on CodeSandbox

(2) Now supporting Chinese('zh'), Japanese('jp'), English('en')

(3)

Event

closePicker event will be emitted when both the start date and end date are selected.

Build Setup

# install dependencies
npm install
# serve with hot reload at localhost:8080
npm run dev
# build for production with minification
npm run build

FAQs

Package last updated on 29 May 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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