Answers for "element ui datepicker disable date"

0

element ui datepicker disable date

This is an old question but I asked myself the same today. You can achieve this using the disabledDate picker option. Here's an example on how to disable all future dates:

<el-date-picker
  :picker-options="datePickerOptions"
</el-date-picker>
Then in your data object:

data () {
  return {
    datePickerOptions: {
      disabledDate (date) {
        return date > new Date()
      }
    }
  }
}
Posted by: Guest on March-22-2021

Browse Popular Code Answers by Language