Skip to content

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]NoDate(1970,0,1)绑定的时间
theme['system','dark','light','custom']No'system'主题色
monthsArrayNo["January","February",...]月份显示数组
weeksArrayNo["Sun.","Mon."...]星期显示输出
hideYearBooleanNofalse是否隐藏年份
hideMonthBooleanNofalse是否隐藏月份
hideDayBooleanNofalse是否隐藏天数
showWeekBooleanNofalse是否显示星期
inputBackgroundStringNoN/A输入框背景色
selectedBackgroundStringNoN/A当前选中框背景色
optionBackgroundStringNoN/A选择器背景色
disabledBooleanNofalse是否禁用选项框
hoverColorStringNoundefined选项的Hover值

Events


事件名(Name)参数类型(args)说明(statement)
focus触发焦点时触发
change当选中的时间发生变化时

MIT Licensed