foobarr
asked on
date time picker null value
Hi
I am having trouble using the DateTimePicker control.
I basically want to print out each time a user choses a date. So I use the ValueChanged event.
However everytime I run my program, the DateTimePicker starts with a null value. I found this out by just having a messagebox display the dateTimePickerControl.valu e.
I have the Control on a panel that is not initially visible, so only when I change to that panel is where the right date gets displayed.
Since it is a null value any other methods that I run because of a date change crash my program.
I was thinking of creating the control dynamically, but I was wondering if there was another way?
I am having trouble using the DateTimePicker control.
I basically want to print out each time a user choses a date. So I use the ValueChanged event.
However everytime I run my program, the DateTimePicker starts with a null value. I found this out by just having a messagebox display the dateTimePickerControl.valu
I have the Control on a panel that is not initially visible, so only when I change to that panel is where the right date gets displayed.
Since it is a null value any other methods that I run because of a date change crash my program.
I was thinking of creating the control dynamically, but I was wondering if there was another way?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I need it formatted to yyyy-MM-dd cuz i'm using mysql so I need to use the control.text which gives me a null value when loading hte program up