vue.js使用laydate


 

<div id='app'>

开始时间:<input type='text' id='start' v-on:focus='getDate'>

{{startTime }}

</div>

 

<script>

var vue = new Vue({

  el: '#app',

  data: { startTime: '' },

  methods: {

    getDate: function () {

    var that = this;
    laydate({

      elem: '#start',
      choose: function (date) {

        that.startTime = date;
      }
    });
  }
}

});

laydate({
  elem: '#start',
  event: 'focus'
});

</script>


免责声明!

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



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