zoukankan      html  css  js  c++  java
  • iview时间默认日期结束时间23:59:59

    <FormItem label="时间:">
                            <DatePicker type="datetimerange" ref="DatePicker" style=" 280px" v-model="createDate"
                                @on-change="timeChange">
                            </DatePicker>
    </FormItem>
     
    timeChange(time) {
                    if (time.length && time[0] && time[1]) {
                        // 没有选择时间就默认23:59:59
                        if (parseTime(this.createDate[1]).slice(-8) === '00:00:00') {
                            this.createDate[1] = new Date(parseTime(time[1], '{y}-{m}-{d}') + ' 23:59:59')
                        }
                        this.formInline.createDateBegin = parseTime(this.createDate[0]);
                        this.formInline.createDateEnd = parseTime(this.createDate[1]);
                    } else {
                        this.formInline.createDateBegin = '';
                        this.formInline.createDateEnd = '';
                    }
                    this.$refs['DatePicker'].internalValue = this.createDate;
                },
  • 相关阅读:
    NOIP2009 pj
    数星星(POJ2352 star)
    洛谷 p3372 模板-线段树 1
    Luogu P1198 [JSOI2008]最大数 线段树
    Bestcoder#92&HDU 6017 T3 Girl loves 233 DP
    NOIP2008pj & luoguP1058 立体图 模拟
    NOIP2003TG 加分二叉树 区间DP
    Redis Jedis lua脚本
    Mac Ideal 常用快捷键
    Mysql慢查询explain
  • 原文地址:https://www.cnblogs.com/wssdx/p/13091964.html
Copyright © 2011-2022 走看看