x

<script src="//unpkg.com/vue/dist/vue.js"></script>
<script src="//unpkg.com/iview/dist/iview.min.js"></script>
<div id="app">
    <row>
        <i-col span="12">
            <date-picker type="date" v-bind:options="optionsDate"></date-picker>
        </i-col>
    </row>
</div>

JS

    var Main = {
        data () {
            return {
              optionsDate: {
                  disabledDate: function (date) {
                      var disabledDay = date.getFullYear();
             //取1950年至今的时间范围.
return disabledDay <= 1949 || date.valueOf() > Date.now(); }, }, } }, methods: { } } var Component = Vue.extend(Main) new Component().$mount('#app')

 

在jsfiddle中运行即可看到效果...

 

x

 

相关文章:

  • 2021-06-30
  • 2022-02-01
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-19
猜你喜欢
  • 2021-12-01
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-15
相关资源
相似解决方案