npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

vue2-datepicker-yyf

v1.1.5

Published

vue

Downloads

2

Readme

vue-datepicker-local

A Beautiful Datepicker Component For Vue2

  • Lightweight (less than 5kb minified and gzipped)
  • Only dependencies Vue
  • Beautiful!

image

Demo

https://weifeiyue.github.io/vue-datepicker-local/

Usage

Install

$ npm install vue-datepicker-local

ES6

<template>
  <vue-datepicker-local v-model="time" />
</template>

<script>
import VueDatepickerLocal from 'vue-datepicker-local'

export default {
  components: {
    VueDatepickerLocal
  },
  data () {
    return {
      time: new Date()
    }
  }
}
</script>

Browser globals

The dist folder contains vue-datepicker-local.js and vue-datepicker-local.css.

<!DOCTYPE html>
<html>
<head>
  <link rel="stylesheet" href="path/to/vue-datepicker-local.css">
</head>
<body>
  <div id="app">
    <vue-datepicker-local v-model="time"></vue-datepicker-local>
  </div>
  <script src="path/to/vue.js"></script>
  <script src="path/to/vue-datepicker-local.js"></script>
  <script>
    new Vue({
      el: "#app",
      data: {
        time: new Date()
      }
    })
  </script>
</body>
</html>

Props

| Prop | Description | Type | Default | |:---------------|:-------------------------------------------------|:-----------|:-------------------| | v-model | dates to be manipulated | Date/Array | -- | | name | name for input | String | -- | | type | type for input (inline/normal) | String | normal | | inputClass | custom class name for input | String | -- | | popupClass | custom class name for popup | String | -- | | disabled | determine whether the DatePicker is disabled | Boolean | false | | clearable | clear the date | Boolean | false | | rangeSeparator | range separator | String | "~" | | format | to set the date format | String | "YYYY-MM-DD" | | local | the local of the DatePicker | Object | {dow: 1, // Monday is the first day of the weekhourTip: '选择小时', // tip of select hourminuteTip: '选择分钟', // tip of select minutesecondTip: '选择秒数', // tip of select secondyearSuffix: '年', // format of headmonthsHead: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(''), // months of headmonths: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(''), // months of panelweeks: '一_二_三_四_五_六_日'.split('_'), // weeks cancelTip: '取消', // default text for cancel button , submitTip: '提交' // default text for submit button } | | disabledDate | specify the date that cannot be selected | Function | (time, format)=>{return false} | | showButtons | show Cancel/Submit buttons | Boolean | false | | placeholder | placeholder of Input | String | -- |

Events

| Event Name | Description | Parameters | |:---------------|:-------------------------------------------------|:-------------------------------------| | confirm |triggers when user confirms | the value component's binding value | | cancel |triggers when user click the cancel button | -- | | clear |triggers when user click the clear button | -- |

License

vue-datepicker-local is licensed under The MIT License.