1.0.83 • Published 4 years ago

@cloud-sn/v-datepicker v1.0.83

Weekly downloads
1
License
MIT
Repository
-
Last release
4 years ago

v-datepicker


Vue datepicker Component

Development

yarn

yarn start

Example

http://localhost:8000/example/default.html

Feature

  • Support IE9+, Chrome, Firefox

Install

npm config set @cloud-sn:registry http://snpm.cnsuning.com

yarn add @cloud-sn/v-datepicker

Usage

import Vue from 'vue';
import DatePicker from '@cloud-sn/v-datepicker';

API

DatePicker

Props

参数名描述类型默认
prefixCls组件类型前缀stringv-calendar
localelocaleObjectimport from 'v-datepicker/es/locale/en_US'
isOpen弹层是否打开Booleanfalse
value当前选中值Date
theme主题light|darklight
disabled禁用Booleanfalse
disabledDate不可选日期Function(current:Date)=>Boolean
disabledTime不可选时分秒Function(current:Date, type)=>{disabledHours:()=>Number[],disabledMinutes:(hour)=>Number[]},disabledSeconds:(hour,minute)=>Number[] }
showTime是否可选择时分秒Booleanfalse
showOk是否显示确定按钮Booleanfalse
showToday是否显示当天按钮Booleanfalse

Events

事件名描述回调
open-change弹窗关闭和打开时触发Function(visible)
change用户选择时间后触发Function(values:Date[], formatDateString:String)
ok当存在确定按钮时 , 用户点击确定按钮触发Function(values:Date[])

RangeDatePicker

Props

参数名描述类型默认
prefixCls组件类名前缀Stringv-calendar
localelocaleObjectimport from 'v-datepicker/es/en_us'
selectedValue当前选中的值 , 包含两个值Date[]
mode控制面板显示状态Enum('date', 'month', 'year', 'decade')[]'date','date'
theme主题light|darklight
isOpen弹层是否打开Booleanfalse
format日期格式String
disabled禁用Booleanfalse
disabledDate不可选日期Function(current:Date)=>Boolean
disabledTime不可选时分秒Function(current:Date, type)=>{disabledHours:()=>number[],disabledMinutes:(hour)=>number[]},disabledSeconds:(hour,minute)=>number[] }
showTime是否可选择时分秒Booleanfalse
showOk是否显示确定按钮Booleanfalse
showToday是否显示返回当天按钮Booleanfalse

Events

事件名描述回调
open-change弹窗关闭和打开时触发Function(visible)
change用户选择时间后触发Function(values:Date[], formatDateStrings:String[])
calendar-change时间发生变化后触发Function(values:Date[])
ok当存在确定按钮时 , 用户点击确定按钮触发Function(values:Date[])