mirror of
https://github.com/Kingsrook/qqq-frontend-material-dashboard.git
synced 2025-07-18 05:10:45 +00:00
CE-1072 return displayValue for DATE_TIME fields (if they're different from the raw value)
This commit is contained in:
@ -219,6 +219,16 @@ class ValueUtils
|
|||||||
|
|
||||||
if (field.type === QFieldType.DATE_TIME)
|
if (field.type === QFieldType.DATE_TIME)
|
||||||
{
|
{
|
||||||
|
if(displayValue && displayValue != rawValue)
|
||||||
|
{
|
||||||
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
// if the date-time actually has a displayValue set, and it isn't just the //
|
||||||
|
// raw-value being copied into the display value by whoever called us, then //
|
||||||
|
// return the display value. //
|
||||||
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
return displayValue;
|
||||||
|
}
|
||||||
|
|
||||||
if (!rawValue)
|
if (!rawValue)
|
||||||
{
|
{
|
||||||
return ("");
|
return ("");
|
||||||
@ -270,6 +280,7 @@ class ValueUtils
|
|||||||
{
|
{
|
||||||
date = new Date(date);
|
date = new Date(date);
|
||||||
}
|
}
|
||||||
|
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
return (`${date.toString("yyyy-MM-dd hh:mm:ss")} ${date.getHours() < 12 ? "AM" : "PM"} ${date.getTimezone()}`);
|
return (`${date.toString("yyyy-MM-dd hh:mm:ss")} ${date.getHours() < 12 ? "AM" : "PM"} ${date.getTimezone()}`);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user