468,234 Members | 1,747 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,234 developers. It's quick & easy.

DateTimePicker..

.... the minimum date of DateTimePicker is 1753-01-01.
How to make DateTime to do not show nothing in its
text if this date is the value? I have a form with a field
LastLogonDate. If user hasn't logon yet this date should
be empty but when binding a property to the DateTimePicker value it always
shows value parsed
prom property which is 1753-01-01. How to make
an "empty" or "not set" date bindable to a value property
of DateTimePicker?
Nov 17 '05 #1
4 5404
Hi Jacek,

this will be a little problem, because
DateTime isn't a nullable typ. A workarround
is to develop an own user control. On this you
should first place a DateTimePicker control
and after that you add a TextBox control
and place it over the input field of the
DateTimePicker. So every time you wouldn't
show a DateTime value within the DateTimerPicker
you show the empty TextBox and set the DateTime
value of the DateTimePicker to a value that
show that there's no DateTime. If the user
then choose a DateTime you hide the TextBox
and show the DateTimePicker.

Cheers
Lars Behrmann

_________________
Nothing is impossible. UML is the key for all your problems.
AODL - Make your .net apps OpenOffice ready
http://aodl.sourceforge.net/

Jacek Jurkowski schrieb:
... the minimum date of DateTimePicker is 1753-01-01.
How to make DateTime to do not show nothing in its
text if this date is the value? I have a form with a field
LastLogonDate. If user hasn't logon yet this date should
be empty but when binding a property to the DateTimePicker value it always
shows value parsed
prom property which is 1753-01-01. How to make
an "empty" or "not set" date bindable to a value property
of DateTimePicker?


Nov 17 '05 #2
Salam

Check out the following link , hope that this can solve your problem

http://www.codeproject.com/cs/miscct...timepicker.asp

--
ALI RAZA SHAIKH
MCAD.net

www.programmersparadise.cjb.net
alirazashaikh.blogspot.com

"Jacek Jurkowski" <pc*****@priv1.onet.pl> wrote in message
news:u6**************@tk2msftngp13.phx.gbl...
... the minimum date of DateTimePicker is 1753-01-01.
How to make DateTime to do not show nothing in its
text if this date is the value? I have a form with a field
LastLogonDate. If user hasn't logon yet this date should
be empty but when binding a property to the DateTimePicker value it always
shows value parsed
prom property which is 1753-01-01. How to make
an "empty" or "not set" date bindable to a value property
of DateTimePicker?

Nov 17 '05 #3
Another option is to check out the following link:
http://www.codeproject.com/cs/miscct...TimePicker.asp

greetings,
Henk

"ALI RAZA" wrote:
Salam

Check out the following link , hope that this can solve your problem

http://www.codeproject.com/cs/miscct...timepicker.asp

--
ALI RAZA SHAIKH
MCAD.net

www.programmersparadise.cjb.net
alirazashaikh.blogspot.com

"Jacek Jurkowski" <pc*****@priv1.onet.pl> wrote in message
news:u6**************@tk2msftngp13.phx.gbl...
... the minimum date of DateTimePicker is 1753-01-01.
How to make DateTime to do not show nothing in its
text if this date is the value? I have a form with a field
LastLogonDate. If user hasn't logon yet this date should
be empty but when binding a property to the DateTimePicker value it always
shows value parsed
prom property which is 1753-01-01. How to make
an "empty" or "not set" date bindable to a value property
of DateTimePicker?


Nov 17 '05 #4
Thank's all of You :-)

It's strange that They didn't work on that ...
It's a very important goal in DB apps. programming...
Nov 17 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Angelina | last post: by
reply views Thread by ROG | last post: by
reply views Thread by Sumit | last post: by
7 posts views Thread by Clamara | last post: by
3 posts views Thread by Charlie | last post: by
3 posts views Thread by Simon Tamman | last post: by
4 posts views Thread by jehugaleahsa | last post: by
reply views Thread by NPC403 | last post: by
reply views Thread by kermitthefrogpy | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.