iview [Feature Request] DatePicker How to Set Disabled Weeks

46scxncf  于 2个月前  发布在  其他
关注(0)|答案(1)|浏览(25)

What problem does this feature solve?

比如预约医师出诊。后台设置只能周几预约,希望这个组件可以禁用每周的星期几,而不单单是一个开始日期和结束日期

What does the proposed API look like?

<DatePicker type="date"  :options="options"  :value="date" placeholder="Please select a date"></DatePicker>
options: {
        disabledDate (date) {
          return date && date.valueOf() < Date.now() - 86400000
        },
     disabledDates :[4,6] // This means that Thursday and Saturday are not optional.
}
vohkndzv

vohkndzv1#

Translation of this issue:

What problem does this feature solve?

For example, make an appointment with a doctor. Background settings can only be reserved for a few weeks, so hopefully this component can disable a few weeks a week, not just a start date and an end date.

What does the proposed API look like?

<DatePicker type="date": options="options": value="date" placeholder="Please select a date"> </DatePicker>
` ` ` `
``` JavaScript
Options: {
DisadDate (date){
Return date & date. valueOf () < Date. now () - 86400000
}
Disabled Dates: [4,6]// This means that Thursday and Saturday are not optional.
}
` ` ` `

相关问题