AntDesign ` ` 只能选择今天之前日期


AntDesign <a-date-picker> 只能选择今天之前日期

<a-date-picker
                    class="project-input"
                    style="width: 100%;"
                    v-decorator="['progressTime', { rules: [{ required: true, message: '请选择更新时间!' }] }]"
                    placeholder="请选择更新时间"
                    :disabledDate="disabledDate"
            />

methods里面:
            disabledDate(current) {
                return current > moment().subtract(0, 'day')//今天之后的年月日不可选,不包括今天
            },

在这里插入图片描述


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM