Skip to content

DateTimeRange 国际化的问题 #3792

@ysjr-2002

Description

@ysjr-2002

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

基于Bootstrapblazor6.5版本做国际化过程中遇到一个问题,
services.AddRequestLocalization<IOptions>((localizerOption, blazorOption) =>
{
var cultures = new[] { "zh-CN" };
localizerOption.AddSupportedCultures(cultures);
localizerOption.AddSupportedUICultures(cultures);
});

页面使用DateTimeRange控件,<DateTimeRange DateFormat="yyyy-MM-dd" @bind-Value="@context.Range"> 当指定简体中文时工作正常。
但指定英文时
services.AddRequestLocalization<IOptions>((localizerOption, blazorOption) =>
{
var cultures = new[] { "en-US" };
localizerOption.AddSupportedCultures(cultures);
localizerOption.AddSupportedUICultures(cultures);
});
出现错误以下错误
1720170428809

请问是什么原因引起的错误?

Expected Behavior

No response

Steps To Reproduce

No response

Exceptions (if any)

No response

.NET Version

5.0

Anything else?

BootstrapBlazor版本是6.5,操作系统Windows 11

Metadata

Metadata

Assignees

Labels

need-repro-projectNeed repro projectquestionQuestion that needs to be answered

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions