Element date range Selector

choose this ["2018-10-08T16:00:00.000Z", "2018-11-05T16:00:00.000Z"]
can you do this ["2018-10-08", "2018-11-05"]


if you are using the latest version of elementui, there is a format attribute

<el-date-picker
    v-model="value12"
    type="date"
    placeholder=""
    format="yyyy  MM  dd "
    value-format="timestamp">
</el-date-picker>

if this doesn't work, you can get the value and use moment to change the format


<el-date-picker
  v-model="value6"
  type="daterange"
  format="yyyy  MM  dd "
  value-format="yyyy-MM-dd"
  range-separator=""
  start-placeholder=""
  end-placeholder="">
</el-date-picker>

so there is no

clipboard.png


Brother die, what do you think of mine

    <div id="app">
        <div class="block">
            <span class="demonstration"></span>
            {{value6}}
            <el-date-picker v-model="value6" type="daterange" range-separator="" start-placeholder=""
                end-placeholder="" @change='ok'>
            </el-date-picker>
        </div>
    </div>

    <script>
        new Vue({
            el: '-sharpapp',
            data() {
                return {
                    value6: '',
                };
            },
            methods: {
                ok: function (val) {
                    var date1 = this.formatDateTime(val[0])
                    var date2 = this.formatDateTime(val[1])
                    console.log(date1, date2)
                },
                formatDateTime: function (inputTime) {
                    var date = new Date(inputTime);
                    var y = date.getFullYear();
                    var m = date.getMonth() + 1;
                    m = m < 10 ? ('0' + m) : m;
                    var d = date.getDate();
                    d = d < 10 ? ('0' + d) : d;
                    var h = date.getHours();
                    h = h < 10 ? ('0' + h) : h;
                    var minute = date.getMinutes();
                    var second = date.getSeconds();
                    minute = minute < 10 ? ('0' + minute) : minute;
                    second = second < 10 ? ('0' + second) : second;
                    return y + '-' + m + '-' + d + ' ' + h + ':' + minute + ':' + second;
                }
            }
        });
    </script>
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1bf3e41-3a25f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1bf3e41-3a25f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?