This commit is contained in:
2020-02-07 00:35:39 +00:00
parent 0e0e86c4ce
commit 99d37a2d5b
7 changed files with 17 additions and 85 deletions

View File

@@ -244,8 +244,6 @@ export default {
return false;
}
// valueStart = window.$gz.dayjs(valueStart);
// valueEnd = window.$gz.dayjs(valueEnd);
valueStart = window.$gz.DateTime.fromISO(valueStart);
valueEnd = window.$gz.DateTime.fromISO(valueEnd);

View File

@@ -224,7 +224,7 @@ export default {
case "time":
case "datetime":
//can it be parsed into a date using the same library as the components use?
if (!window.$gz.dayjs(ret).isValid()) {
if (!window.$gz.DateTime.fromISO(ret).isValid()) {
ret = null;
}
break;

View File

@@ -97,14 +97,6 @@ export default {
this.hour12
);
},
// formatDate() {
// return this.value
// ? window.$gz.dayjs
// .utc(this.value)
// .add(window.$gz.locale.format().timeZoneOffset, "hour")
// .format(window.$gz.locale.format().shortDate)
// : "";
// },
formatTime() {
return window.$gz.locale.utcDateToShortTimeLocalized(
this.value,

View File

@@ -10,10 +10,7 @@ import "./registerServiceWorker";
import errorHandler from "./api/errorhandler";
import NProgress from "nprogress";
import "nprogress/nprogress.css";
import dayjs, { Dayjs } from "dayjs";
import { DateTime } from "luxon";
import UTC from "dayjs/plugin/utc"; // load on demand
dayjs.extend(UTC); // use plugin
import lodash from "./libs/lodash.min.js";
//my libs
@@ -57,7 +54,6 @@ window.$gz = {
menu: gzmenu,
dialog: gzdialog,
util: gzutil,
dayjs: dayjs,
DateTime: DateTime,
_: lodash,
api: gzapi,