!3552 fix(#I62BF5): do not update the end data in the DateTimeRange component

* chore: bump version 7.0.5
* fix: 修复时间范围右侧组件未关联问题
* fix: 修复首次加载时间范围开始时间背景色丢失问题
This commit is contained in:
Argo 2022-11-21 13:44:14 +00:00
parent 75aaaccf36
commit f5eae00235
3 changed files with 5 additions and 2 deletions

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">
<PropertyGroup>
<Version>7.0.4</Version>
<Version>7.0.5</Version>
</PropertyGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net5.0'">

View File

@ -376,6 +376,9 @@ public partial class DatePickerBody
{
base.OnParametersSet();
CurrentDate = Value.Date;
CurrentTime = Value - CurrentDate;
DatePlaceHolder ??= Localizer[nameof(DatePlaceHolder)];
TimePlaceHolder ??= Localizer[nameof(TimePlaceHolder)];
TimeFormat ??= Localizer[nameof(TimeFormat)];

View File

@ -164,7 +164,7 @@ public partial class DateTimeRange
StartValue = Value.Start;
EndValue = Value.End;
if (StartValue == DateTime.MinValue) StartValue = DateTime.Now;
if (StartValue == DateTime.MinValue) StartValue = DateTime.Today;
if (EndValue == DateTime.MinValue) EndValue = StartValue.AddMonths(1);
SelectedValue.Start = StartValue;