Topic: datepicker how to hide years less then given year

modadvisor free asked 4 years ago


Dear Sir,

I checked datepicker example but i can not find the solution related my problem.

i wan to disable all years which are less then 2017. user should not able to select any dates which is less than 1st january 2017. please help to fix this issue in the datepicker. i mean what i need to pass for that ?


modadvisor free commented 4 years ago

any update sir ?


Mikołaj Smoleński staff answered 4 years ago


This kind of limitation is described in our docs: https://mdbootstrap.com/docs/vue/forms/date-picker/#disabled-from

Here's the js part of it:

<script>
  import { mdbDatePicker2 } from 'mdbvue';
  export default {
    name: 'Example',
    components: {
      mdbDatePicker2
    },
    data() {
      return {
        toLimit: [{
          type: 'to',
          to: '2017-01-01'
        }]
      }
    }
  }
</script>

Best regards



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB Vue
  • MDB Version: 6.7.1
  • Device: PC
  • Browser: google chrome
  • OS: Windows 10
  • Provided sample code: No
  • Provided link: No