Skip to content
New issue

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

[BUG]RangePicker 组件Ranges 选定后value未更新 #152

Open
onsuper opened this issue May 23, 2023 · 0 comments
Open

[BUG]RangePicker 组件Ranges 选定后value未更新 #152

onsuper opened this issue May 23, 2023 · 0 comments

Comments

@onsuper
Copy link

onsuper commented May 23, 2023

🐛 bug 描述
📷 复现步骤 | Recurrence steps
RangePicker 组件 设置 Ranges 在组件会显示出Ranges 的配置如 当日,本月,本年等等
选择: 当日,或者 本年,或者本月之后不会将 bind-value数据未更新,

<RangePicker TValue="DateTime?[]" @bind-Value="@_fillterDto.Times" Ranges="@RangePickerRangs.GetRangs()" />

/// 日期控件的时间选择 public static Dictionary<string, DateTime?[]> GetRangs() { var Ranges = new Dictionary<string, DateTime?[]>() { { "当天", new DateTime?[] { DateTime.Now.Date, DateTime.Now.Date.AddDays(1) } } , { "昨天", new DateTime?[] { DateTime.Now.Date.AddDays(-1), DateTime.Now.Date } } , { "前天", new DateTime?[] { DateTime.Now.Date.AddDays(-2), DateTime.Now.Date.AddDays(-1) } } , { "本月", new DateTime?[] { new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1), new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1).AddMonths(1) } } , { "上月", new DateTime?[] { new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1).AddMonths(-1), new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1) } } , { "本年", new DateTime?[] { new DateTime(DateTime.Now.Year, 1, 1), new DateTime(DateTime.Now.Year, 1, 1).AddYears(1) } } , }; return Ranges; }
🏞 期望结果 | Expected results
💻 复现代码 | Recurrence code
© 版本信息
Ant Design Pro 版本: [0.14.4.1]
umi 版本
浏览器环境
开发环境 [windows10 vs2022]``

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant