1
votes

HTML Code is

 <datepicker :date="child" :option="option" v-model="child.dob" @change="updatechildDOB(child)" :disabled="disabled"></datepicker>

Option are:

option: {
    type: 'day',
    week: ['Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa', 'Su'],
    month: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
    format: 'YYYY-MM-DD',
    placeholder: 'Date of birth',
    color: {
        header: '#2b98a7',
        headerText: '#fff'
    },
    buttons: {
        ok: 'Ok',
        cancel: 'Cancel'
    },
    overlayOpacity: 0.5, // 0.5 as default
        dismissible: true // as true as default
    },
    disabled: {
        from: new Date()
    },

Any help??

1
Please provide more information, like any errors in the developer console.D.B.

1 Answers

0
votes

What you need to do is:

disabled: {
    to: new Date(2016, 0, 5), // Disable all dates up to specific date
    from: new Date(2016, 0, 26), // Disable all dates after specific date
}

Check the documentation at https://github.com/charliekassel/vuejs-datepicker