1.1.11 • Published 6 years ago

lovue-datepicker v1.1.11

Weekly downloads
4
License
MIT
Repository
github
Last release
6 years ago

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

PropDescriptionTypeDefault
v-modeldates to be manipulatedDate/Array--
namename for inputString--
typetype for input (inline/normal)Stringnormal
inputClasscustom class name for inputString--
popupClasscustom class name for popupString--
disableddetermine whether the DatePicker is disabledBooleanfalse
clearableclear the dateBooleanfalse
rangeSeparatorrange separatorString"~"
formatto set the date formatString"YYYY-MM-DD"
localthe local of the DatePickerObject{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}
disabledDatespecify the date that cannot be selectedFunction()=>{return false}

License

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

1.1.11

6 years ago

1.1.10

6 years ago

1.1.9

6 years ago

1.1.8

6 years ago

1.1.7

6 years ago

1.1.6

6 years ago

1.1.5

6 years ago

1.1.4

6 years ago

1.1.3

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago