364,033 Members | 4752 Browsing Online
Community for Developers & IT Professionals
Bytes IT Community

DateTimePicker..

Jacek Jurkowski
P: n/a
Jacek Jurkowski
.... 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
Share this Question
Share on Google+
4 Replies


Lars Behrmann
P: n/a
Lars Behrmann
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:
[color=blue]
> ... 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?[/color]

Nov 17 '05 #2

ALI RAZA
P: n/a
ALI RAZA
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" <pcmigel@priv1.onet.pl> wrote in message
news:u6Ng73u1FHA.3524@tk2msftngp13.phx.gbl...[color=blue]
> ... 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?
>[/color]


Nov 17 '05 #3

Henk van der Geld
P: n/a
Henk van der Geld
Another option is to check out the following link:
http://www.codeproject.com/cs/miscct...TimePicker.asp

greetings,
Henk

"ALI RAZA" wrote:
[color=blue]
> 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" <pcmigel@priv1.onet.pl> wrote in message
> news:u6Ng73u1FHA.3524@tk2msftngp13.phx.gbl...[color=green]
> > ... 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?
> >[/color]
>
>
>[/color]
Nov 17 '05 #4

Jacek Jurkowski
P: n/a
Jacek Jurkowski
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

Post your reply

Help answer this question



Didn't find the answer to your C# / C Sharp question?

You can also browse similar questions: C# / C Sharp