Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

如何在时间选择器中插入一些自定的内容 #90

Open
EdwardQ opened this issue Dec 24, 2019 · 1 comment
Open

如何在时间选择器中插入一些自定的内容 #90

EdwardQ opened this issue Dec 24, 2019 · 1 comment

Comments

@EdwardQ
Copy link

EdwardQ commented Dec 24, 2019

No description provided.

@EdwardQ
Copy link
Author

EdwardQ commented Dec 26, 2019

可以使用自定义组件field-plan-date,使用方式

custom_dateA: {
    label: '自定义日期1',
    type: 'plan-date',
    props: {
        'popper-class': 'testData',
        'picker-options': {
            disabledDate(time) {
                const dates = ['2019/01/02 00:00:00', '2019/01/15 00:00:00'].map(date => new Date(date).getTime());
                return dates.indexOf(time.getTime()) >= 0;
            },
            cellContent: [{
                label: '2019/01/06',
                value: '14501/16000'
            }, {
                label: '2019/01/07',
                value: '14502/16000'
            }, {
                label: '2019/01/08',
                value: '14503/16003'
            }, {
                label: '2019/01/09',
                value: '11112/22222'
            }]
        }
    },
    on: {
        async focus(date) {
            console.log(date);
        },
        panelDateChange(date) {
            console.log(date);
        }
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant