Update for #1753 Date format for the Audit
Added Parameter DateTimeFormat with default value of "MMM dd yyyy HH:mm:ss"
This commit is contained in:
parent
db2e3a518d
commit
fce9220dcb
|
@ -35,6 +35,9 @@
|
|||
[Parameter]
|
||||
public string Style { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public string DateTimeFormat { get; set; } = "MMM dd yyyy HH:mm:ss";
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
_text = string.Empty;
|
||||
|
@ -49,7 +52,7 @@
|
|||
|
||||
if (CreatedOn != null)
|
||||
{
|
||||
_text += $" {Localizer["On"]} <b>{CreatedOn.Value.ToString("MMM dd yyyy HH:mm:ss")}</b>";
|
||||
_text += $" {Localizer["On"]} <b>{CreatedOn.Value.ToString(DateTimeFormat)}</b>";
|
||||
}
|
||||
|
||||
_text += "</p>";
|
||||
|
@ -66,7 +69,7 @@
|
|||
|
||||
if (ModifiedOn != null)
|
||||
{
|
||||
_text += $" {Localizer["on"]} <b>{ModifiedOn.Value.ToString("MMM dd yyyy HH:mm:ss")}</b>";
|
||||
_text += $" {Localizer["on"]} <b>{ModifiedOn.Value.ToString(DateTimeFormat)}</b>";
|
||||
}
|
||||
|
||||
_text += "</p>";
|
||||
|
@ -83,7 +86,7 @@
|
|||
|
||||
if (DeletedOn != null)
|
||||
{
|
||||
_text += $" {Localizer["On"]} <b>{DeletedOn.Value.ToString("MMM dd yyyy HH:mm:ss")}</b>";
|
||||
_text += $" {Localizer["On"]} <b>{DeletedOn.Value.ToString(DateTimeFormat)}</b>";
|
||||
}
|
||||
|
||||
_text += "</p>";
|
||||
|
|
Loading…
Reference in New Issue
Block a user