Vue日历控件

<html>

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>测试title>
    
    <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
head>
<body>
<div id="app">
    <el-date-picker
            v-model="value1"
            type="datetime"
            format="yyyy-MM-dd hh:mm"
            value-format="yyyy-MM-dd hh:mm"
            placeholder="选择日期时间">
    el-date-picker>
    <el-button type="primary" @click="clickBtn">打印选择的时间el-button>
div>

<script type="text/javascript" src="./js/vue.js">script>
<script src="https://unpkg.com/element-ui/lib/index.js">script>

<script type="text/javascript">
    new Vue({
        el: "#app",
        data: {
            value1: ""
        },
        methods: {
            clickBtn: function () {
                console.log(this.value1);
            }
        }

    });
script>

body>

html>

你可能感兴趣的:(Vue日历控件)