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 7259
Hi,
"Chris Shepherd" <ch**@nospam.chsh.cawrote in message
news:uA**************@TK2MSFTNGP06.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*************@TK2MSFTNGP06.phx.gbl...
Hi,
"Chris Shepherd" <ch**@nospam.chsh.cawrote in message
news:uA**************@TK2MSFTNGP06.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"
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...
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**********@hotmail.comwrote in message
news:ee**************@TK2MSFTNGP06.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**************@TK2MSFTNGP04.phx.gbl...
Hi,
"OZI" <sq**********@hotmail.comwrote in message
news:ee**************@TK2MSFTNGP06.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.chsh.cawrote in message
news:OP**************@TK2MSFTNGP03.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 might help or give you some direction http://www.codeproject.com/cs/miscct...timepicker.asp
"Chris Shepherd" <ch**@nospam.chsh.cawrote in message
news:OP**************@TK2MSFTNGP03.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.
Hi,
"OZI" <sq**********@hotmail.comwrote in message
news:O4**************@TK2MSFTNGP02.phx.gbl...
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.
You are right, it's not available.
You will have to do it yourself. Before doing that I advise you to google
aroudn for projects, this may be asked and answered before.
For example a query of datetimepicker color in google returned this: http://www.codeproject.com/cs/miscct...timepicker.asp
Otherwise take a look at some commercial options like Infragistics.
Infragistics implement a kind of CSS for windows controls that is super
cool, You can change the look of your application on the fly and the
controls are very configurable
Ignacio Machin ( .NET/ C# MVP ) wrote:
You will have to do it yourself. Before doing that I advise you to google
aroudn for projects, this may be asked and answered before.
For example a query of datetimepicker color in google returned this: http://www.codeproject.com/cs/miscct...timepicker.asp
Yeah, I had googled and found several similar but not quite examples of
other controls. I was just wondering if there was some kind of simpler
method that I had somehow missed.
Otherwise take a look at some commercial options like Infragistics.
Infragistics implement a kind of CSS for windows controls that is super
cool, You can change the look of your application on the fly and the
controls are very configurable
Looks cool, I may have to see if management will go for it.
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,...
|
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...
|
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...
|
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...
|
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.
...
|
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...
|
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...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
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...
|
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,...
| |