mirror of
https://gitee.com/ant-design-blazor/ant-design-blazor.git
synced 2024-12-02 03:57:38 +08:00
fix(module: datepicker): the reference value of initValue (#3459)
* fix initValue reference * fix name
This commit is contained in:
parent
faa26e202d
commit
f469aea9a7
@ -370,7 +370,7 @@ namespace AntDesign
|
||||
}
|
||||
ResetPlaceholder();
|
||||
|
||||
_initValue = Value;
|
||||
_initValue = (TValue)(_value as Array).Clone();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -8,7 +8,7 @@
|
||||
string style = "";
|
||||
if (currentViewDate.Day == 1)
|
||||
{
|
||||
style = "border: 1px solid #1890ff; borderRadius: 50%";
|
||||
style = "border: 1px solid #1890ff; border-radius: 50%";
|
||||
}
|
||||
|
||||
return @<div class="ant-picker-cell-inner" style="@style">
|
||||
|
@ -24,7 +24,9 @@
|
||||
</SelectOptions>
|
||||
</Select>
|
||||
</FormItem>
|
||||
|
||||
<FormItem Label="DateRange">
|
||||
<RangePicker @bind-Value="context.DateRange" />
|
||||
</FormItem>
|
||||
<FormItem WrapperColOffset="8" WrapperColSpan="16">
|
||||
<Button Type="@ButtonType.Primary" HtmlType="submit">
|
||||
Submit
|
||||
@ -45,6 +47,8 @@
|
||||
public string Note { get; set; }
|
||||
[Required]
|
||||
public string Gender { get; set; }
|
||||
[Required]
|
||||
public DateTime?[] DateRange { get; set; }
|
||||
}
|
||||
|
||||
private Model model = new Model();
|
||||
@ -54,6 +58,7 @@
|
||||
{
|
||||
model.Note = "Hello Sir!";
|
||||
model.Gender = "Male";
|
||||
model.DateRange = new DateTime?[] { DateTime.Now, DateTime.Now.AddDays(1) };
|
||||
|
||||
Console.WriteLine($"form ref:{form}");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user