修复日期控件初始化格式可能错误的问题

This commit is contained in:
GoEdgeLab
2021-09-15 19:40:42 +08:00
parent fc1d65bec3
commit 4c0f2d95ad
2 changed files with 136 additions and 135 deletions

View File

@@ -132,7 +132,7 @@ Vue.component("datetime-input", {
this.hasSecondError = false
date.setSeconds(second)
this.timestamp = parseInt(date.getTime() / 1000)
this.timestamp = Math.ceil(date.getTime() / 1000)
},
leadingZero: function (s, l) {
if (l <= s.length) {

View File

@@ -73,10 +73,11 @@ window.teaweb = {
// 加载
if (typeof Pikaday == "undefined") {
let that = this
this.loadJS("/js/moment.min.js")
this.loadJS("/js/pikaday.js", function () {
this.loadJS("/js/moment.min.js", function () {
that.loadJS("/js/pikaday.js", function () {
that.datepicker(element, callback)
})
})
this.loadCSS("/js/pikaday.css")
this.loadCSS("/js/pikaday.theme.css")
this.loadCSS("/js/pikaday.triangle.css")