material ui datepicker disable dates code example

Example 1: how to disable keyboard calender input in material ui datepicker reactjs

<KeyboardDatePicker
  ...
  InputProps={{ readOnly: true }}

/>

Example 2: 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()
      }
    }
  }
}

Tags:

Misc Example