diff --git a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/Extensibility/TableColumns/TableColumn.cs b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/Extensibility/TableColumns/TableColumn.cs index 745c9380ea..cde7cd34aa 100644 --- a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/Extensibility/TableColumns/TableColumn.cs +++ b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/Extensibility/TableColumns/TableColumn.cs @@ -10,6 +10,8 @@ namespace Volo.Abp.AspNetCore.Components.Extensibility.TableColumns public string Title { get; set; } public string Data { get; set; } [CanBeNull] + public string DisplayFormat { get; set; } + [CanBeNull] public Type Component { get; set; } public List Actions { get; set; } diff --git a/framework/src/Volo.Abp.BlazoriseUI/AbpCrudPageBase.cs b/framework/src/Volo.Abp.BlazoriseUI/AbpCrudPageBase.cs index b17cc067e1..c4f953139c 100644 --- a/framework/src/Volo.Abp.BlazoriseUI/AbpCrudPageBase.cs +++ b/framework/src/Volo.Abp.BlazoriseUI/AbpCrudPageBase.cs @@ -19,6 +19,7 @@ using Volo.Abp.Localization; using Volo.Abp.Authorization; using Volo.Abp.BlazoriseUI.Components; using Volo.Abp.ObjectExtending.Modularity; +using Volo.Abp.ObjectExtending; namespace Volo.Abp.BlazoriseUI { @@ -502,10 +503,17 @@ namespace Volo.Abp.BlazoriseUI } else { + string displayFormat = null; + if (propertyInfo.IsDate() || propertyInfo.IsDateTime()) + { + displayFormat = propertyInfo.GetDateEditInputFormatOrNull(); + } + yield return new TableColumn { Title = propertyInfo.GetLocalizedDisplayName(StringLocalizerFactory), - Data = $"ExtraProperties[{propertyInfo.Name}]" + Data = $"ExtraProperties[{propertyInfo.Name}]", + DisplayFormat = displayFormat }; } } diff --git a/framework/src/Volo.Abp.BlazoriseUI/Components/AbpExtensibleDataGrid.razor b/framework/src/Volo.Abp.BlazoriseUI/Components/AbpExtensibleDataGrid.razor index 3a8e2720fc..baea37bea1 100644 --- a/framework/src/Volo.Abp.BlazoriseUI/Components/AbpExtensibleDataGrid.razor +++ b/framework/src/Volo.Abp.BlazoriseUI/Components/AbpExtensibleDataGrid.razor @@ -1,7 +1,6 @@ @typeparam TItem @using Blazorise.DataGrid; @using Volo.Abp.Data -@using Volo.Abp.BlazoriseUI.Components.ObjectExtending diff --git a/framework/src/Volo.Abp.BlazoriseUI/Components/ObjectExtending/DateTimeExtensionProperty.razor b/framework/src/Volo.Abp.BlazoriseUI/Components/ObjectExtending/DateTimeExtensionProperty.razor index a951089e45..a9847d8e33 100644 --- a/framework/src/Volo.Abp.BlazoriseUI/Components/ObjectExtending/DateTimeExtensionProperty.razor +++ b/framework/src/Volo.Abp.BlazoriseUI/Components/ObjectExtending/DateTimeExtensionProperty.razor @@ -2,12 +2,14 @@ @typeparam TResourceType @using Volo.Abp.BlazoriseUI @using Volo.Abp.Localization +@using Volo.Abp.ObjectExtending @if (PropertyInfo != null && Entity != null) { @PropertyInfo.GetLocalizedDisplayName(StringLocalizerFactory)