diff --git a/Oqtane.Client/Modules/Controls/AuditInfo.razor b/Oqtane.Client/Modules/Controls/AuditInfo.razor index 1584fd6e..d36e7f9a 100644 --- a/Oqtane.Client/Modules/Controls/AuditInfo.razor +++ b/Oqtane.Client/Modules/Controls/AuditInfo.razor @@ -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"]} {CreatedOn.Value.ToString("MMM dd yyyy HH:mm:ss")}"; + _text += $" {Localizer["On"]} {CreatedOn.Value.ToString(DateTimeFormat)}"; } _text += "

"; @@ -66,7 +69,7 @@ if (ModifiedOn != null) { - _text += $" {Localizer["on"]} {ModifiedOn.Value.ToString("MMM dd yyyy HH:mm:ss")}"; + _text += $" {Localizer["on"]} {ModifiedOn.Value.ToString(DateTimeFormat)}"; } _text += "

"; @@ -83,7 +86,7 @@ if (DeletedOn != null) { - _text += $" {Localizer["On"]} {DeletedOn.Value.ToString("MMM dd yyyy HH:mm:ss")}"; + _text += $" {Localizer["On"]} {DeletedOn.Value.ToString(DateTimeFormat)}"; } _text += "

";