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. 12 7271
Hi,
"Chris Shepherd" <ch**@nospam.ch sh.cawrote in message
news:uA******** ******@TK2MSFTN GP06.phx.gbl...
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 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"
This must be for a WinForm, I don't see CssClass.
"Ignacio Machin ( .NET/ C# MVP )" <machin TA laceupsolutions .comwrote in
message news:uX******** *****@TK2MSFTNG P06.phx.gbl...
Hi,
"Chris Shepherd" <ch**@nospam.ch sh.cawrote in message
news:uA******** ******@TK2MSFTN GP06.phx.gbl...
>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 DateTimePick er 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 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"
Are you saying MinDate and MaxDate properties will not do it for you?
"Chris Shepherd" <ch**@nospam.ch sh.cawrote in message
news:uA******** ******@TK2MSFTN GP06.phx.gbl...
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.
Hi,
"OZI" <sq**********@h otmail.comwrote in message
news:ee******** ******@TK2MSFTN GP06.phx.gbl...
>
This must be for a WinForm, I don't see CssClass.
My bad, I though it was for a web app.
But still the idea is valid, just to try to have the same color of the
font/background in the needed cells.
OZI wrote:
Are you saying MinDate and MaxDate properties will not do it for you?
Nope, try it yourself. Just add a DateTimePicker and a MinDate and
MaxDate, and for me, by default, it simply means the user can't click
those dates once the MonthCalendar control has dropped down. Visibly
there isn't a difference between a valid date in the current month and
an invalid date in the current month.
Chris.
Ignacio Machin ( .NET/ C# MVP ) wrote:
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"
This isn't a web control, but a WinForms control.
Chris.
Ignacio Machin ( .NET/ C# MVP ) wrote:
My bad, I though it was for a web app.
But still the idea is valid, just to try to have the same color of the
font/background in the needed cells.
The trouble is visibility to those cells.
Chris.
Yes the Idea is valid in theory and thin air. I don't see how to control
each individual day format.
It is not available like on in the web control.
"Ignacio Machin ( .NET/ C# MVP )" <machin TA laceupsolutions .comwrote in
message news:eK******** ******@TK2MSFTN GP04.phx.gbl...
Hi,
"OZI" <sq**********@h otmail.comwrote in message
news:ee******** ******@TK2MSFTN GP06.phx.gbl...
>> This must be for a WinForm, I don't see CssClass.
My bad, I though it was for a web app.
But still the idea is valid, just to try to have the same color of the
font/background in the needed cells.
Okay so what you want to do with the invalid dates is to make them
invisible.
There must be a way to override the rendering, but I don't see how now.
"Chris Shepherd" <ch**@nospam.ch sh.cawrote in message
news:OP******** ******@TK2MSFTN GP03.phx.gbl...
OZI wrote:
>Are you saying MinDate and MaxDate properties will not do it for you?
Nope, try it yourself. Just add a DateTimePicker and a MinDate and
MaxDate, and for me, by default, it simply means the user can't click
those dates once the MonthCalendar control has dropped down. Visibly there
isn't a difference between a valid date in the current month and an
invalid date in the current month.
Chris.
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Tom Rahav |
last post by:
Hi.
I have a DateTimePicker on a win form in VB.NET 2003, and I have a database
table that contains different dates as records.
What I want to do is detect what dates are exist in the database, and mark
then on the DateTimePicker.
Does anyone know how can I mark a specific date in the DateTimePicker (which
is not the current date)?
...
|
by: Guy |
last post by:
I have extended the datetimepicker control to incorporate
a ReadOnly property.
I have used the new keyword to implement my own version
of the value property, so that if readonly == true then
it will not set the value of the control and will leave
the checked status of the checkbox to false when a user
selects a new date.
this works fine...
|
by: Edward Mitchell |
last post by:
I have a number of DateTimePicker controls, some set to dates, some set to a
format of Time. The controls are all embedded in dialogs. I created the
controls by dragging the DateTime picker from the Toolbox and then set the
Format property appropriately.
I have noticed that sometimes the Time format will reset spontaneously to
Short Date. ...
|
by: Jeronimo Bertran |
last post by:
Is there any edit box type control that allows dates to be entered?
Something similar to the DateTimePicker in Windows Forms?
Thanks,
Jeronimo
|
by: Brett Baisley |
last post by:
Hello
I am using two datetimepicker controls to allow the user to select two
dates. I've called them dateIn and dateOut. After they pick the dateIn, I
want to set its Leave method to automatically set the date of dateOut to
whatever was selected in dateIn + 2 days (as this will be the most common
selection for the second date).
I tried...
| |
by: Atley |
last post by:
Is there a way to use the DateTimePicker to pick a time or is it just used
to pick dates? If so, why is it called DATEtimepicker?
|
by: Chris Fairman |
last post by:
NG,
Maybe I'm missing a key step, but it seems when typing dates into a
DateTimePicker control (format = 'Short'), the controls' .text property is
not updated until the control losses focus.
I'm handling an <enter> key event on a DateTimePicker control.
Essentially I want to give a user the ability to type a date in the
DTP, and press...
|
by: Jesse |
last post by:
Hi,
I am working on datetimepicker and want make the dates out of my range
disabled.
There are APIs that I have used: minDate, maxDate. It works fine.
However, users can not tell which date can't be selected as the dates
in the dropdown are with the same color.
This is not kind to user.
I want to make the dates out of the selectable range...
|
by: Todd Carnes |
last post by:
I am trying to write an app in C# that requires the user to enter a date
from 4000 B.C.E to 4000 C.E. I tried to use the DateTimePicker Control
to allow the user to enter the date, but it only supports the Gregorian
Calendar, so the earliest date it allows is in 1752 C.E.
Is there a way to override the DateTimePicker control's minimum...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...
| |