DateTimePicker和最小/最大日期的可见性。 [英] DateTimePicker and visibility to Min/Max Dates.
问题描述
问候组,
我有一种情况,我希望在
DateTimePicker上明显看到禁用日期。选择器中的最小和最大日期通常只会设置为相隔天数,因此我希望这可以反映在
方式中,而不仅仅是失败选择何时点击。似乎
这样可以使用MonthCalendar控件,但是
DateTimePicker本身似乎没有公开内部MonthCalendar,
它也不提供任何类型的高光照明选项。
我会接受任何/所有疯狂的建议。 :)
克里斯。
Greetings group,
I have a situation where I''d like to visibly see disabled dates on a
DateTimePicker. Frequently the Min and Max dates in the picker will be
set only to days apart, and so I would like this to be reflected in a
way other than it simply failing to select when they click. It seems
like this would be doable with a MonthCalendar control, however the
DateTimePicker itself doesn''t seem to expose an internal MonthCalendar,
nor does it provide any kind of hihglighting options.
I''m open to any/all crazy suggestions. :)
Chris.
推荐答案
Chris Shepherd < ch ** @ nospam.chsh.cawrote in message
news:uA ************** @ TK2MSFTNGP06.phx.gbl ...
Hi,
"Chris Shepherd" <ch**@nospam.chsh.cawrote in message
news:uA**************@TK2MSFTNGP06.phx.gbl...
问候小组,
我有一种情况,我希望在一个上面看到残疾日期
DateTimePicker。通常选择器中的最小和最大日期将被设置为
仅相隔数天,所以我希望这能以某种方式反映
而不仅仅是失败选择何时点击。似乎这个
可以使用MonthCalendar控件,但是DateTimePicker
本身似乎没有公开内部MonthCalendar,也不是它
提供任何类型的高光照明选项。
我会接受任何/所有疯狂的建议。 :)
Greetings group,
I have a situation where I''d like to visibly see disabled dates on a
DateTimePicker. Frequently the Min and Max dates in the picker will be set
only to days apart, and so I would like this to be reflected in a way
other than it simply failing to select when they click. It seems like this
would be doable with a MonthCalendar control, however the DateTimePicker
itself doesn''t seem to expose an internal MonthCalendar, nor does it
provide any kind of hihglighting options.
I''m open to any/all crazy suggestions. :)
IIRC您可以控制每个单元格在控件中的外观。你可以将
设置为CssClass为文本不可见的样式。所以它将会是隐形
IIRC you can control how each cell will looks like in the control. You
could set the CssClass to a style that the text is not visible. So it will
be "invisible"
这必须是一个WinForm,我不是''参见CssClass。
Ignacio Machin(.NET / C#MVP)" < machin TA laceupsolutions.com写在
消息新闻:uX ************* @ TK2MSFTNGP06.phx.gbl ...
This must be for a WinForm, I don''t see CssClass.
"Ignacio Machin ( .NET/ C# MVP )" <machin TA laceupsolutions.comwrote in
message news:uX*************@TK2MSFTNGP06.phx.gbl...
" Chris Shepherd" < ch ** @ nospam.chsh.cawrote in message
news:uA ************** @ TK2MSFTNGP06.phx.gbl ...
Hi,
"Chris Shepherd" <ch**@nospam.chsh.cawrote in message
news:uA**************@TK2MSFTNGP06.phx.gbl...
>问候组,
我有一种情况,我希望在一个
DateTimePicker上明显看到禁用日期。选择器中的最小和最大日期通常只设置为相隔数天,所以我希望这会以某种方式反映
,而不是在点击时无法选择。看起来这对于MonthCalendar控件来说是可行的,但是
DateTimePicker本身似乎没有公开内部MonthCalendar,
也没有提供任何类型的高亮显示选项。 br />
我对任何/所有疯狂的建议持开放态度。 :)
>Greetings group,
I have a situation where I''d like to visibly see disabled dates on a
DateTimePicker. Frequently the Min and Max dates in the picker will be
set only to days apart, and so I would like this to be reflected in a way
other than it simply failing to select when they click. It seems like
this would be doable with a MonthCalendar control, however the
DateTimePicker itself doesn''t seem to expose an internal MonthCalendar,
nor does it provide any kind of hihglighting options.
I''m open to any/all crazy suggestions. :)
IIRC您可以控制每个单元格在控件中的外观。你可以将
设置为CssClass为文本不可见的样式。所以它将会是不可见
IIRC you can control how each cell will looks like in the control. You
could set the CssClass to a style that the text is not visible. So it will
be "invisible"
你是说MinDate和MaxDate属性不会这样做对你来说?
" Chris Shepherd" < ch ** @ nospam.chsh.cawrote in message
news:uA ************** @ TK2MSFTNGP06.phx.gbl ...
Are you saying MinDate and MaxDate properties will not do it for you?
"Chris Shepherd" <ch**@nospam.chsh.cawrote in message
news:uA**************@TK2MSFTNGP06.phx.gbl...
问候小组,
我有一种情况,我希望在一个上面看到残疾日期
DateTimePicker。通常选择器中的最小和最大日期将被设置为
仅相隔数天,所以我希望这能以某种方式反映
而不仅仅是失败选择何时点击。似乎这个
可以使用MonthCalendar控件,但是DateTimePicker
本身似乎没有公开内部MonthCalendar,也不是它
提供任何类型的高光照明选项。
我会接受任何/所有疯狂的建议。 :)
克里斯。
Greetings group,
I have a situation where I''d like to visibly see disabled dates on a
DateTimePicker. Frequently the Min and Max dates in the picker will be set
only to days apart, and so I would like this to be reflected in a way
other than it simply failing to select when they click. It seems like this
would be doable with a MonthCalendar control, however the DateTimePicker
itself doesn''t seem to expose an internal MonthCalendar, nor does it
provide any kind of hihglighting options.
I''m open to any/all crazy suggestions. :)
Chris.
这篇关于DateTimePicker和最小/最大日期的可见性。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!