jeDate icon indicating copy to clipboard operation
jeDate copied to clipboard

时间控件的最小时间有bug

Open junzibuqi123 opened this issue 8 years ago • 4 comments

当我设置最小时间到时分秒时如 2015-06-16 10:20:25 那么当前的版本的控件会让我所有日期的时分秒选择都必须大于10:20:25 例如2017-11-09 09:10:10 就选不了

junzibuqi123 avatar Nov 09 '17 05:11 junzibuqi123

我也碰到了这个问题 image

wastone avatar Nov 09 '17 09:11 wastone

+1

vylan avatar Jan 22 '18 16:01 vylan

我在sethmsStrHtml方法中,注释掉 if (hmsCls.html() == "") 这条判断语句就没问题了

aoliaoliao avatar Feb 02 '18 07:02 aoliaoliao

我也碰到了这个问题 image

目前方法可以这样搞

<div class="jeitem">
                    <label class="jelabel jw43">时间:</label>
                    <div class="jeinpbox" @click="openDate('#stime','YYYY-MM-DD hh:mm:ss',1)">
                        <input type="text" readonly class="jeinput" id="stime" placeholder="开始时间">
                        <div class="icons-jedate jebtns"></div>
                    </div>
                </div>
openDate(dom, format, status) {
            var self = this;
            //获取当前时间戳
            var minDates = moment((moment().unix() - 3 * 30 * 24 * 60 * 60) * 1000 + (24 * 60 * 60*1000)).format("YYYY-MM-DD 00:00:00");
            var maxDates = moment().format("YYYY-MM-DD 23:59:59")
            console.log(minDates, maxDates, 'aabbcc')
            jeDate(dom, {
                trigger: false,
                format: format,
                theme: {
                    bgcolor: "#5985f7",
                    color: "#ffffff",
                    pnColor: "#5985f7"
                },
                donefun: function(obj) {
                    if (status == 1) {
                        self.startTime = makeTimes(obj.val);
                    } else if (status == 2) {
                        self.endTime = makeTimes(obj.val);
                    }
                },
                minDate: minDates,
                maxDate: maxDates,
            });
        }

yyccQQu avatar May 28 '19 06:05 yyccQQu