有没有办法在视图模型中设置 DateTime 的范围,使输入的最大可能日期为当前日期和时间(UTC),最小日期可能为一年前?
就像是[Range(typeof(DateTime), "06/06/2020 23:43", "Utc.Now")]?
[Range(typeof(DateTime), "06/06/2020 23:43", "Utc.Now")]
先感谢您。
asp.net-mvc datetime asp.net-core
asp.net-core ×1
asp.net-mvc ×1
datetime ×1