Appearance
DatePicker-Default
vue
<fv-DatePicker v-model="date" >
</fv-DatePicker>
DatePicker-Simple
vue
<fv-DatePicker v-model="date" :hideYear="true">
</fv-DatePicker>
DatePicker-Full
vue
<fv-DatePicker v-model="date" :showWeek="true">
</fv-DatePicker>
DatePicker-Disabled
vue
<fv-DatePicker v-model="date" :showWeek="true">
</fv-DatePicker>
DatePicker-Custom
vue
<fv-DatePicker
v-model="date"
:showWeek="true"
class="custom_style"
hoverColor="rgba(0, 204, 153,0.7)"
innerBorderColor="rgb(0, 204, 153)"
:optionsStyle="{backgroundColor:'rgba(0, 204, 153,0.6)',color:'white',borderColor:'rgba(0, 204, 153,0.6)'}"
:selectStyle="{backgroundColor:'rgb(0, 204, 153)'}"
>
</fv-DatePicker>
<style>
.custom_style{
background-color: rgb(0, 204, 153);
border:1px solid rgb(0, 204, 153);
color:white;
}
.custom_style:hover{
border:1px solid rgb(0, 204, 153);
background-color: rgb(0, 204, 153,0.8);
}
</style>
Propoties
属性(attr) | 类型(type) | 必填(required) | 默认值(default) | 说明(statement) |
---|---|---|---|---|
v-model | [Date] | No | Date(1970,0,1) | 绑定的时间 |
theme | ['system','dark','light','custom'] | No | 'system' | 主题色 |
months | Array | No | ["January","February",...] | 月份显示数组 |
weeks | Array | No | ["Sun.","Mon."...] | 星期显示输出 |
hideYear | Boolean | No | false | 是否隐藏年份 |
hideMonth | Boolean | No | false | 是否隐藏月份 |
hideDay | Boolean | No | false | 是否隐藏天数 |
showWeek | Boolean | No | false | 是否显示星期 |
inputBackground | String | No | N/A | 输入框背景色 |
selectedBackground | String | No | N/A | 当前选中框背景色 |
optionBackground | String | No | N/A | 选择器背景色 |
disabled | Boolean | No | false | 是否禁用选项框 |
hoverColor | String | No | undefined | 选项的Hover值 |
Events
事件名(Name) | 参数类型(args) | 说明(statement) |
---|---|---|
focus | 触发焦点时触发 | |
change | 当选中的时间发生变化时 |