We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have added 2 DateTime into extra properties for the IdentityUser
`ObjectExtensionManager.Instance.Modules() .ConfigureIdentity(identity => { identity.ConfigureUser(user => { user.AddOrUpdateProperty( //property type: string "MemberStartDate", //property name property => { property.Attributes.Add(new DisplayFormatAttribute() { DataFormatString = "{0:yyyy/MM/dd/}" }); property.DefaultValueFactory = () => "";
//validation rules property.Validators.Add(context => { if (context.Value != null) { var startDate = (DateTime) context.Value; var endDate = context.ValidatingObject.GetProperty<DateTime>("MemberEndDate"); if (endDate < startDate) { var message = LocalizableString.Create<LMSResource>("InvalidStartDate").Name; context.ValidationErrors.Add( new ValidationResult( message, new[] { "extraProperties.MemberStartDate" } ) ); } } }); } ); user.AddOrUpdateProperty<DateTime>( //property type: string "MemberEndDate", //property name property => { property.DefaultValueFactory = () => ""; //validation rules property.Attributes.Add(new DisplayFormatAttribute() { DataFormatString = "{0:yyyy/MM/dd/}" }); } ); }); });`
And I have added the display format attribute for these 2 DateTime properties as well, but seems it does not work in UI part?
The text was updated successfully, but these errors were encountered:
https://github.com/abpframework/abp/blob/HEAD/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/ObjectExtending/MvcUiObjectExtensionPropertyInfoExtensions.cs
You can try add new DataTypeAttribute(DataType.Date).
new DataTypeAttribute(DataType.Date)
Current version does not seem to support DisplayFormatAttribute
DisplayFormatAttribute
Sorry, something went wrong.
ExtendingPropertry
No branches or pull requests
I have added 2 DateTime into extra properties for the IdentityUser
`ObjectExtensionManager.Instance.Modules()
.ConfigureIdentity(identity =>
{
identity.ConfigureUser(user =>
{
user.AddOrUpdateProperty( //property type: string
"MemberStartDate", //property name
property =>
{
property.Attributes.Add(new DisplayFormatAttribute() { DataFormatString = "{0:yyyy/MM/dd/}" });
property.DefaultValueFactory = () => "";
And I have added the display format attribute for these 2 DateTime properties as well, but seems it does not work in UI part?
The text was updated successfully, but these errors were encountered: