Datetimepicker issue

M

Michael

Hi Everyone,
I've got a real strange issue with the datetimepicker (DP) that just seemed
to start (at least just noticed today). During the load process of the form
(actually contains 3 datetimepicker and all have same problem) the DP will
display the current date instead of the date that it was assigned. This only
happens when the form is loading.
What interesting is that I put some debug.print statements in some of the
events such as the Form_paint and form_show event. here is a little printout
of the debug results:
Form_Shown: DP.Value = 8/15/2007 DP.Text:
frmPatientInfo2_Paint = DP.Value 8/15/2007 DP.Text:
After selecting the tap to reveal the datetimepicker control I get this
paint result.
frmPatientInfo2_Paint = DP.Value 8/15/2007 Text: 11/20/2008
By the way the DP.Value property does have the correct value, SO WHY THE
HECK is it not displaying the correct value. PLEASE Help.
Thanks Michael
P.S. There is only one place in my code where I set the datetimepicker to
the current date and that's in the addNew button when is not being activated.
I'm sure of that.
 
R

Ryan S. Thiele

Have you tried settings the DateTimePicker.Value setting?

The text of the DateTimePicker is just that. The value is the underlying
value and you should try to set that and see.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top