且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

灰色显示/禁用Windows窗体中日期时间选择器中当前日期之前的日期

更新时间:2023-12-06 13:21:16

DateTimePicker.MinDate Property

https://msdn.microsoft.com/ en-us / library / system.windows.forms.datetimepicker.mindate(v = vs.110).aspx [ ^ ]
DateTimePicker.MinDate Property
https://msdn.microsoft.com/en-us/library/system.windows.forms.datetimepicker.mindate(v=vs.110).aspx[^]


你有别无选择,只能制作自己的控件版本并提供自己渲染的代码。



我见过的所有DatePicker控件都没有显示超出MinDate和MaxDate值的任何内容。
You have no choice but to make your own version of the control and provide the code to render it yourself.

All of the DatePicker controls I've ever seen don't show anything beyond the MinDate and MaxDate values.