diff --git a/src/BootstrapBlazor.Server/Components/Samples/DateTimePickers.razor b/src/BootstrapBlazor.Server/Components/Samples/DateTimePickers.razor index bf9e8ebd3ec..d515b753b46 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/DateTimePickers.razor +++ b/src/BootstrapBlazor.Server/Components/Samples/DateTimePickers.razor @@ -39,6 +39,12 @@

@((MarkupString)Localizer["FeatureIntro"].Value)

+
@((MarkupString)Localizer["FeatureFestivalIntro"].Value)
@@ -51,7 +57,7 @@
-
@@ -173,10 +179,6 @@ - - - - @@ -188,6 +190,38 @@ + +
+ + @((MarkupString)Localizer["DisableDayCallbackTip"].Value) + + +
+
+ +
+
+ +
+
+
+
+
+
+ + +
+
+ + +
+
+
+ diff --git a/src/BootstrapBlazor.Server/Components/Samples/DateTimePickers.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/DateTimePickers.razor.cs index 11477f88ad5..0d64dc10031 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/DateTimePickers.razor.cs +++ b/src/BootstrapBlazor.Server/Components/Samples/DateTimePickers.razor.cs @@ -90,6 +90,54 @@ private string BindValueString private bool _showSolarTerm = true; private bool _showFestivals = true; private bool _showHolidays = true; + private bool _disableWeekend = true; + private bool _disableToday = true; + private DateTime? _disabledNullValue = DateTime.Today; + private DateTime _disabledValue = DateTime.Today; + + private async Task> OnGetDisabledDaysCallback(DateTime start, DateTime end) + { + var ret = new List(); + if (_disableWeekend) + { + var day = start; + while (day <= end) + { + if (day.DayOfWeek is DayOfWeek.Sunday or DayOfWeek.Saturday) + { + ret.Add(day); + } + day = day.AddDays(1); + } + + if (DateTime.Today.DayOfWeek is DayOfWeek.Sunday or DayOfWeek.Saturday) + { + // 处理今天是否禁用 + ret.Add(DateTime.Today); + } + } + + if (_disableToday) + { + // 处理今天是否禁用 + ret.Add(DateTime.Today); + } + + // 模拟异步延迟 + await Task.Delay(100); + return ret; + } + + private DateTimePicker _picker1 = default!; + + private DateTimePicker _picker2 = default!; + + private Task OnDisabledDaysChanged(bool v) + { + _picker1.ClearDisabledDays(); + _picker2.ClearDisabledDays(); + return Task.CompletedTask; + } /// /// 获得事件方法 @@ -108,6 +156,12 @@ private EventItem[] GetEvents() => Name = "ValueChanged", Description = Localizer["Event2"], Type ="EventCallback" + }, + new() + { + Name = "OnGetDisabledDaysCallback", + Description = Localizer["OnGetDisabledDaysCallbackEvent"], + Type ="Func>>" } ]; @@ -214,6 +268,20 @@ private AttributeItem[] GetAttributes() => Type = "bool", ValueList = "true/false", DefaultValue = "false" + }, + new() { + Name = "EnableDisabledDaysCache", + Description = Localizer["AttrEnableDisabledDaysCache"], + Type = "bool", + ValueList = "true/false", + DefaultValue = "true" + }, + new() { + Name = "DisplayDisabledDayAsEmpty", + Description = Localizer["AttrDisplayDisabledDayAsEmpty"], + Type = "bool", + ValueList = "true/false", + DefaultValue = "false" } ]; } diff --git a/src/BootstrapBlazor.Server/Components/Samples/Toggles.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/Toggles.razor.cs index 98000a7b59f..11720383dd0 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Toggles.razor.cs +++ b/src/BootstrapBlazor.Server/Components/Samples/Toggles.razor.cs @@ -71,7 +71,7 @@ private AttributeItem[] GetAttributes() => Description = Localizer["OffTextAttr"], Type = "string", ValueList = "—", - DefaultValue = Localizer["OffTextDefautValue"]! + DefaultValue = Localizer["OffTextDefaultValue"]! }, new() { @@ -79,7 +79,7 @@ private AttributeItem[] GetAttributes() => Description = Localizer["OnTextAttr"], Type = "string", ValueList = "—", - DefaultValue = Localizer["OnTextDefautValue"]! + DefaultValue = Localizer["OnTextDefaultValue"]! }, new() { diff --git a/src/BootstrapBlazor.Server/Locales/en-US.json b/src/BootstrapBlazor.Server/Locales/en-US.json index 22488952715..3584a5c9621 100644 --- a/src/BootstrapBlazor.Server/Locales/en-US.json +++ b/src/BootstrapBlazor.Server/Locales/en-US.json @@ -1030,8 +1030,8 @@ "BootstrapBlazor.Server.Components.Samples.Labels": { "LabelsTitle": "Component label", "LabelsDescription": "This set of components includes ValidateForm EditorForm and a variety of Form components inherited from ValidateBase<TValue>. Among these components There is a special set of display front label logic, now let’s sort it out in a unified way:", - "LabelsDescriptionTips1": "The ValidateForm component is a verifiable form component. The form component in this component will automatically perform data compliance checks. If Data non-compliance will prevent the Submit action, which is the most frequently used component in data submission", - "LabelsDescriptionTips2": "The EditorForm component is an ordinary form component. After this component is bound to the Model, the entire form can be automatically generated, which greatly reduces repetition Code, put the ValidateForm on the outside to open the data compliance check very convenient, concise and efficient", + "LabelsDescriptionTips1": "The ValidateForm component is a verifiable form component. The form component in this component will automatically perform data compliance checks. If Data non-compliance will prevent the Submit action, which is the most frequently used component in data submission", + "LabelsDescriptionTips2": "The EditorForm component is an ordinary form component. After this component is bound to the Model, the entire form can be automatically generated, which greatly reduces repetition Code, put the ValidateForm on the outside to open the data compliance check very convenient, concise and efficient", "LabelsDescriptionTips3": "Take the BootstrapInput input box component as an example to explain whether to display the Label logic", "LabelsTips": "The logic of ShowLabel is the principle of proximity. The closer the setting is to itself, the setting takes effect. For example, the form component is built into the ValidateForm component, even if ValidateForm is set to >ShowLabel=true, when the form component itself sets ShowLabel=false, the final result of the label is not displayed", "LabelsNormalTitle": "Use alone", @@ -1074,11 +1074,11 @@ "BootstrapBlazor.Server.Components.Pages.Install": { "InstallTitle": "Install", "GitP1": "There are many kinds of Git tools that everyone is familiar with, here I introduce two Git client tools", - "GitP2": "It is recommended to use the Fork tool to install, it can better and Visutal Studio to use with development tools.", + "GitP2": "It is recommended to use the Fork tool to install, it can better and Visual Studio to use with development tools.", "NugetInstall": "Nuget Install", "NugetP1": "Use nuget.org to install BootstrapBlazor components", "EnvBuildTitle": "Project Environment Construction", - "EnvLi1": "Install .net core sdk Official Website", + "EnvLi1": "Install .net core sdk Official Website", "EnvLi2": "Install Visual Studio 2022 and above Official website", "EnvLi3": "Pull the project code BootstrapBlazor Warehouse URL" }, @@ -1089,7 +1089,7 @@ }, "BootstrapBlazor.Server.Components.Components.UpdateIntro": { "H1": "Component library updated to", - "B1": "Bootstrap Blazor at present has more than 120 components. This component is based on", + "B1": "Bootstrap Blazor at present has nearly 200 components. This component is based on", "B2": "An enterprise-level component library that provides several types of common components such as layout, navigation, form, data, notification, icon, voice, etc. Each component has been carefully designed with modularity, responsiveness and excellent performance. Starting from more practical scenarios, meeting the needs of various scenarios, greatly reducing the time cost of developers, greatly shortening the development cycle, greatly improving development efficiency, and providing a set of", "B3": "General Rights Management System", "B4": "Example project", @@ -2494,7 +2494,7 @@ "Description": "Used to select or enter a date", "NormalTitle": "Select the day", "NormalIntro": "Select the control based on the date of the day in 「day」as the base unit", - "ShowIconTitle": "Wether show the component icon", + "ShowIconTitle": "Whether show the component icon", "ShowIconIntro": "Save space by setting ShowIcon=\"false\" to not display component icons", "ValidateFormTitle": "Client validation", "ValidateFormIntro": "Check data validity and prompt automatically based on custom validation rules", @@ -2523,12 +2523,12 @@ "BlockAutoCloseIntro": "Auto close the popup window by se AutoClose to true", "BlockAutoCloseDesc": "AutoClose The default value is true When selecting a date, the pop-up window will automatically close. When the value is set to false, the pop-up window needs to be closed when the confirm button is clicked", "BlockGroupTitle": "InputGroup", - "BlockGroupIntro": "combox with BootstrapInputGroupLabel inside BootstrapInputGroupLabel", + "BlockGroupIntro": "Used in the built-in BootstrapInputGroup and in combination with BootstrapInputGroupLabel", "Att1": "Whether to display the front label", "Att2": "Whether to display the shortcut sidebar", "Att3": "The front label displays text", "Att4": "Date format string The default is yyyyy-MM-dd", - "Att6": "Whether to disable Fasle by default", + "Att6": "Whether to disable False by default", "Att8": "The value of the component is a two-way binding with ValueChanged", "Att9": "Get/Set Component display mode The default is the month-to-day display mode", "AttrAutoClose": "Whether auto close the popup window", @@ -2544,8 +2544,6 @@ "ValidateFormValue": "DateTimePick", "DateTimePickerTitle": "Select the time", "DateTimePickerIntro": "Select the hour, minute, and second on the clock dial to obtain the current date and time.", - "ShowLunarTitle": "Show lunar", - "ShowLunarIntro": "Display the lunar calendar by setting ShowLunar=\"true\"", "DayTemplateTitle": "Custom date display", "DayTemplateIntro": "By setting the DayTemplate custom display template, the disabled date template is DayDisabledTemplate", "AttrShowLunar": "Whether to display ChineseLunar", @@ -2558,7 +2556,22 @@ "FeatureShowFestivals": "Festivals", "FeatureShowHolidays": "Holidays", "FeatureIntro": "Holidays Functional dependency component packages BootstrapBlazor.Holiday [Portal]", - "FeatureFestivalIntro": "The festival function is provided by the built-in service ICalendarFestivals in the component library. The built-in default implementation provides 12 Gregorian festivals and 7 lunar festivals, which can be extended through custom festival services. For detailed function introductions, please refer to the Festival Services documentation [Portal]" + "FeatureFestivalIntro": "The festival function is provided by the built-in service ICalendarFestivals in the component library. The built-in default implementation provides 12 Gregorian festivals and 7 lunar festivals, which can be extended through custom festival services. For detailed function introductions, please refer to the Festival Services documentation [Portal]", + "DisableOptions": "Disable options", + "DisableWeekend": "Disable weekend", + "DisableToday": "Disable today", + "DisableDayCallbackTitle": "Customize the disable date", + "DisableDayCallbackIntro": "Customize which days need to be disabled by setting OnGetDisabledDaysCallback", + "DisableDayCallbackTip": "
  • When a component is assigned a disabled date, the component still displays its value by default. If you need to display the disabled date as an empty string, please set DisplayDisabledDayAsEmpty=\"true\"
  • This example uses slightly more complex logic to determine the disabled date. The disabled date is a combination of conditions, so when the conditions change, you need to call the component instance method ClearDisabledDays to clear the internal cache

In this example, the first component has DisplayDisabledDayAsEmpty=\"true\" set, so the component value is DateTime.Today and the displayed value is empty string

In this example, the data type of the second component is non-nullable type. Since the default value of the parameter AutoToday is true So even if the initial value is DateTime.MinValue, its display value is DateTime.Today Even when today is disabled, it is still displayed. If you need to display an empty string, please set DisplayDisabledDayAsEmpty=\"true\"
", + "DisableDayCallbackAllowNullDisplayText": "DateTime?", + "DisableDayCallbackNotAllowNullDisplayText": "DateTime", + "FeatureShowLunarIntro": "ShowLunar Whether to display the lunar calendar", + "FeatureShowSolarTermIntro": "ShowSolarTerm Whether to display the 24 solar terms", + "FeatureShowFestivalsIntro": "ShowFestivals Whether to display festivals", + "FeatureShowHolidaysIntro": "ShowHolidays Whether to display holidays", + "OnGetDisabledDaysCallbackEvent": "Disable date callback method", + "AttrEnableDisabledDaysCache": "Whether to enable custom disabled date cache", + "AttrDisplayDisabledDayAsEmpty": "Display disabled date as an empty string" }, "BootstrapBlazor.Server.Components.Samples.TimePickers": { "Title": "TimePicker", @@ -3289,9 +3302,9 @@ "Color": "Color", "IsDisabled": "Whether to disable it", "OffTextAttr": "The text is displayed when the component is off", - "OffTextDefautValue": "Shrink", + "OffTextDefaultValue": "Shrink", "OnTextAttr": "The text is displayed when component On", - "OnTextDefautValue": "Unfold", + "OnTextDefaultValue": "Unfold", "Width": "The width of the component", "Value": "Get the value", "ShowLabel": "Whether to display the front label", @@ -3354,7 +3367,7 @@ "UploadNormalTitle": "Basic usage", "UploadNormalIntro": "The InputUpload component is used with other form components to display the file name, select the file and upload it by clicking the browse button, and by setting the ShowRemoveButton parameter, display the delete button, click the delete button to call back onDelete delegate method", "UploadNormalLabelName": "Name:", - "UploadNormalLabelAddress": "Adress:", + "UploadNormalLabelAddress": "Address:", "UploadNormalLabelPhoto": "Photo:", "UploadFormSettingsTitle": "FormSettings", "UploadFormSettingsIntro": "Use the file upload component to constrain the file format within the form", @@ -3376,7 +3389,7 @@ "AvatarUploadTips2": "Round avatar frame", "AvatarUploadTips3": "When you set up IsSingle, you can upload only one image or file", "AvatarUploadTips4": "
The component provides Accept property for upload file filtering, in this case the circular avatar box accepts both GIF and JPEG images, sets the Accept='image/gif, image/jpeg' and can be written as: Accept='image/*' if you don't restrict the format of the image. Whether this property is not secure or should be to file format validation using the server-side authentication
", - "AvatarUploadTips5": "RELATED: [Accept] [Media Types]", + "AvatarUploadTips5": "RELATED: [Accept] [Media Types]", "AvatarUploadTips6": "Set the preview address PrevUrl with the DefaultFileList property", "AvatarUploadTips7": "Verify that an example of using a picture box is used in the form", "AvatarUploadButtonText": "Submit", @@ -3395,7 +3408,7 @@ "UploadFileIconTemplateTitle": "Custom file icon", "UploadFileIconTemplateIntro": "By setting the IconTemplate parameter and using the FileIcon component, you can further customize the file icon [FileIcon example]", "UploadBase64Title": "Base64 format", - "UploadBase64Intro": "use data:image/xxx;base64,XXXXX format data string as PrevUrl value", + "UploadBase64Intro": "use data:image/xxx;base64,xxx format data string as PrevUrl value", "UploadsShowDeleteButton": "Whether to display the Delete button", "UploadsShowDownloadButton": "Whether to display the Download button", "UploadsIsDisabled": "Whether to disable it", diff --git a/src/BootstrapBlazor.Server/Locales/zh-CN.json b/src/BootstrapBlazor.Server/Locales/zh-CN.json index cf16ea7c3df..b4ffa8137b1 100644 --- a/src/BootstrapBlazor.Server/Locales/zh-CN.json +++ b/src/BootstrapBlazor.Server/Locales/zh-CN.json @@ -1030,9 +1030,9 @@ "BootstrapBlazor.Server.Components.Samples.Labels": { "LabelsTitle": "组件标签", "LabelsDescription": "本套组件中有 ValidateForm EditorForm 以及多种继承 ValidateBase<TValue>表单组件,这些组件中有一套特殊的显示前置标签逻辑,现在我们统一的梳理一下:", - "LabelsDescriptionTips1": "ValidateForm 组件是 可验证的 表单组件,此组件内的表单组件会自动进行数据合规性检查,如果数据不合规将会阻止 提交(Submit) 动作,是数据提交中使用最最最频繁的组件", - "LabelsDescriptionTips2": "EditorForm 组件是普通的表单组件,此组件绑定 Model 后即可自动生成整个表单,大大减少重复性编码,外面套上 ValidateForm 即可开启 数据合规性检查 非常方便、简洁、高效", - "LabelsDescriptionTips3": "以 BootstrapInput 输入框组件为例,阐述一下是否显示 Label 逻辑", + "LabelsDescriptionTips1": "ValidateForm 组件是 可验证的 表单组件,此组件内的表单组件会自动进行数据合规性检查,如果数据不合规将会阻止 提交(Submit) 动作,是数据提交中使用最最最频繁的组件", + "LabelsDescriptionTips2": "EditorForm 组件是普通的表单组件,此组件绑定 Model 后即可自动生成整个表单,大大减少重复性编码,外面套上 ValidateForm 即可开启 数据合规性检查 非常方便、简洁、高效", + "LabelsDescriptionTips3": "以 BootstrapInput 输入框组件为例,阐述一下是否显示 Label 逻辑", "LabelsTips": "ShowLabel 的逻辑即就近原则,离自身越近的设置生效,如表单组件内置到 ValidateForm 组件中,即使 ValidateForm 设置 ShowLabel=true,表单组件自身设置 ShowLabel=false 时,标签最终结果为 不显示", "LabelsNormalTitle": "单独使用", "LabelsNormalIntro": "适用于数据录入", @@ -1074,11 +1074,11 @@ "BootstrapBlazor.Server.Components.Pages.Install": { "InstallTitle": "安装", "GitP1": "Git 工具有很多种大家比较熟悉的,这里我介绍两款 Git 客户端工具", - "GitP2": "推荐使用 Fork 工具进行安装,它能更好地和 Visutal Studio 开发工具配合使用。", + "GitP2": "推荐使用 Fork 工具进行安装,它能更好地和 Visual Studio 开发工具配合使用。", "NugetInstall": "Nuget 安装", "NugetP1": "使用 nuget.org 进行 BootstrapBlazor 组件的安装", "EnvBuildTitle": "项目环境搭建", - "EnvLi1": "安装 .net core sdk 官方网址", + "EnvLi1": "安装 .net core sdk 官方网址", "EnvLi2": "安装 Visual Studio 2022 以上 官方网址", "EnvLi3": "拉取项目代码 BootstrapBlazor 仓库网址" }, @@ -1089,7 +1089,7 @@ }, "BootstrapBlazor.Server.Components.Components.UpdateIntro": { "H1": "组件库 更新到", - "B1": "首先感谢您对本套组件的关注,目前本套组件已经拥有超过 120 个组件,本组件是基于", + "B1": "首先感谢您对本套组件的关注,目前本套组件已经拥有将近 200 个组件,本组件是基于", "B2": "企业级组件库,提供如布局、导航、表单、数据、通知、图标、语音等几大类通用组件,每一个组件都经过精心设计,具有模块化、响应式和优秀的性能。从更多实际场景出发,满足多种场景的需求,极大的减少开发者时间成本,大大缩短开发周期,大幅提高开发效率,并提供了一套", "B3": "通用权限管理系统", "B4": "示例工程", @@ -2495,7 +2495,7 @@ "NormalTitle": "选择日", "NormalIntro": "以「日」为基本单位,基础的日期选择控件", "ShowIconTitle": "是否显示组件图标", - "ShowIconIntro": "通过设置 ShowIcon=\"false\" 不显示组件图标节约空间", + "ShowIconIntro": "通过设置 ShowIcon=\"false\" 不显示组件图标节约空间", "ValidateFormTitle": "客户端验证", "ValidateFormIntro": "根据自定义验证规则进行数据有效性检查并自动提示", "IsEditableTitle": "手工录入", @@ -2528,7 +2528,7 @@ "Att2": "是否显示快捷侧边栏", "Att3": "前置标签显示文本", "Att4": "日期格式字符串 默认为 yyyy-MM-dd", - "Att6": "是否禁用 默认为 fasle", + "Att6": "是否禁用 默认为 false", "Att8": "组件值与 ValueChanged 作为双向绑定的值", "Att9": "获得/设置 组件显示模式 默认为显示年月日模式", "AttrAutoClose": "选中日期后是否自动关闭弹窗", @@ -2544,8 +2544,6 @@ "ValidateFormValue": "时间", "DateTimePickerTitle": "时间选择", "DateTimePickerIntro": "通过时钟表盘选择时分秒,获取当前的日期和时间。", - "ShowLunarTitle": "显示农历", - "ShowLunarIntro": "通过设置 ShowLunar=\"true\" 显示农历", "DayTemplateTitle": "自定义日期显示", "DayTemplateIntro": "通过设置 DayTemplate 自定义显示模板,禁用的日期模板为 DayDisabledTemplate", "AttrShowLunar": "是否显示农历", @@ -2558,7 +2556,22 @@ "FeatureShowFestivals": "节日", "FeatureShowHolidays": "法定假日", "FeatureIntro": "假日功能依赖组件包 BootstrapBlazor.Holiday [传送门]", - "FeatureFestivalIntro": "节日功能由组件库内置服务 ICalendarFestivals 提供,内置默认实现提供了 12 个公历节日与 7 个农历节日,可以通过自定义节日服务进行扩展,详细功能介绍请参阅 节日服务 文档 [传送门]" + "FeatureFestivalIntro": "节日功能由组件库内置服务 ICalendarFestivals 提供,内置默认实现提供了 12 个公历节日与 7 个农历节日,可以通过自定义节日服务进行扩展,详细功能介绍请参阅 节日服务 文档 [传送门]", + "DisableOptions": "组合禁用条件", + "DisableWeekend": "禁用周末", + "DisableToday": "禁用今天", + "DisableDayCallbackTitle": "自定义禁用日期", + "DisableDayCallbackIntro": "通过设置 OnGetDisabledDaysCallback 自定义哪些日期需要被禁用", + "DisableDayCallbackTip": "

请注意

  • 组件赋值为禁用日期时,组件默认仍然显示其值,如果需要将禁用日期显示为 空字符串 请设置 DisplayDisabledDayAsEmpty=\"true\"
  • 本例为稍微复杂逻辑判断禁用日期,禁用日期为组合条件,所以当条件更改时需要调用组件实例方法 ClearDisabledDays 清除内部缓存

本例中第一个组件由于设置了 DisplayDisabledDayAsEmpty=\"true\" 所以组件值为 DateTime.Today 显示值为 空字符串

本例中第二个组件数据类型为 不可为空类型 由于参数 AutoToday 默认值为 true 所以即使初始化值为 DateTime.MinValue 其显示值为 DateTime.Today 即使当禁用今天时,仍然显示,如果需要显示 空字符串 请设置 DisplayDisabledDayAsEmpty=\"true\"
", + "DisableDayCallbackAllowNullDisplayText": "可为空类型", + "DisableDayCallbackNotAllowNullDisplayText": "不可为空类型", + "FeatureShowLunarIntro": "ShowLunar 是否显示农历", + "FeatureShowSolarTermIntro": "ShowSolarTerm 是否显示 24 节气", + "FeatureShowFestivalsIntro": "ShowFestivals 是否显示节日", + "FeatureShowHolidaysIntro": "ShowHolidays 是否显示假日", + "OnGetDisabledDaysCallbackEvent": "获得自定义禁用日期回调方法", + "AttrEnableDisabledDaysCache": "是否启用获得自定义禁用日期缓存", + "AttrDisplayDisabledDayAsEmpty": "显示禁用日期为空字符串" }, "BootstrapBlazor.Server.Components.Samples.TimePickers": { "Title": "TimePicker 时间选择器", @@ -3289,9 +3302,9 @@ "Color": "颜色", "IsDisabled": "是否禁用", "OffTextAttr": "组件 Off 时显示文本", - "OffTextDefautValue": "收缩", + "OffTextDefaultValue": "收缩", "OnTextAttr": "组件 On 时显示文本", - "OnTextDefautValue": "展开", + "OnTextDefaultValue": "展开", "Width": "组件宽度", "Value": "获取值", "ShowLabel": "是否显示前置标签", @@ -3376,7 +3389,7 @@ "AvatarUploadTips2": "圆形头像框", "AvatarUploadTips3": "设置 IsSingle 时,仅可以上传一张图片或者文件", "AvatarUploadTips4": "
组件提供了 Accept 属性用于设置上传文件过滤功能,本例中圆形头像框接受 GIF 和 JPEG 两种图像,设置 Accept='image/gif, image/jpeg',如果不限制图像的格式,可以写为:Accept='image/*',该属性并不安全还是应该是使用 服务器端验证 进行文件格式验证
", - "AvatarUploadTips5": "相关文档:[Accept 属性详解] [Media Types 详细列表]", + "AvatarUploadTips5": "相关文档:[Accept 属性详解] [Media Types 详细列表]", "AvatarUploadTips6": "通过 DefaultFileList 属性设置预览地址 PrevUrl 即可", "AvatarUploadTips7": "验证表单内使用头像框示例", "AvatarUploadButtonText": "提交", diff --git a/src/BootstrapBlazor/Components/DateTimePicker/DatePickerBody.razor b/src/BootstrapBlazor/Components/DateTimePicker/DatePickerBody.razor index 2e1b6a3e0e9..da506968ab3 100644 --- a/src/BootstrapBlazor/Components/DateTimePicker/DatePickerBody.razor +++ b/src/BootstrapBlazor/Components/DateTimePicker/DatePickerBody.razor @@ -175,7 +175,7 @@ } - @if (MinValue == null && MaxValue == null) + @if (!IsDisabled(DateTime.Today)) {