Update to show empty string for null datetime

This commit is contained in:
2022-08-10 08:25:30 -05:00
parent 26457f4086
commit 52208a383d

View File

@ -38,6 +38,10 @@ class QValueUtils
if (field.type === QFieldType.DATE_TIME)
{
if (!rawValue)
{
return ("");
}
const date = new Date(rawValue);
// @ts-ignore
return (`${date.toString("yyyy-MM-dd hh:mm:ss")} ${date.getHours() < 12 ? "AM" : "PM"} ${date.getTimezone()}`);