and-design-vue date-picker中文时间选择效果代码

代码语言:html

所属分类:选择器

代码描述:and-design-vue date-picker中文时间选择效果代码

代码标签: 时间 选择 效果

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html lang="en">

<head>

    <meta charset="UTF-8">



    <link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/antd.1.7.4.css">




</head>

<body>

    <div id="app" style="margin:100px">
      
            <a-date-picker  format="YYYY-MM-DD HH:mm:ss" :disabled-date="disabledDate" :disabled-time="disabledTime" :show-time="{ defaultValue: moment('00:00:00', 'HH:mm:ss') }" :placeholder="['开始日期']" />
     

    </div>
    <script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/vue@2.6.1.js"></script>
    <script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/moment-with-locales.js"></script>
    <script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/antd-with-locales.1.7.4.js"></script>
    <script>
        moment.locale('zh-cn'); //设置语言 或 moment.lang('zh-cn');
        Vue.prototype.$moment = moment; //挂载到当前vue实例对象
        new Vue({
            el: "#app",
            data: {
                disabledHours: [],
                disabledMinutes: [],
                disabledSeconds: [],
            
            },
            methods: {
                moment,
                range(start, end) {
                    const result = [];
                    for (let i = start; i < end; i++) {
                        result.push(i);
                    }
                    return result;
                },
                disabledDate(curr.........完整代码请登录后点击上方下载按钮下载查看

网友评论0