473,699 Members | 2,385 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DateTimePicker and visibility to Min/Max Dates.

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.
Sep 21 '07
12 7282
OZI
this might help or give you some direction

http://www.codeproject.com/cs/miscct...timepicker.asp
"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.

Sep 21 '07 #11
Hi,

"OZI" <sq**********@h otmail.comwrote in message
news:O4******** ******@TK2MSFTN GP02.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
Sep 21 '07 #12
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.
Sep 21 '07 #13

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1420
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)? Thanks! Tom Rahav.
9
3966
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 when using the control on a win2k machine but if we use it on a win XP box and call
7
8487
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. I looked at the .rc file and found that the usual form for a Short Date is as follows: CONTROL ...
3
3246
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
1
1003
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 this: dateOut.value = dateIn.value + 2
2
5060
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?
2
3382
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 <enter> and have a DataGrid populate with user supplied data from the DTP control.
1
3137
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 to show a different color as they are disabled.
2
5219
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 allowed date, or am I forced to resort to the less user-friendly use of three separate text boxes for...
0
8685
marktang
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8613
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9032
jinu1996
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7745
agi2029
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6532
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4374
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2344
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2008
bsmnconsultancy
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.