1.11M Members

datetime picker display data

 
0
 

hi
i have a question relating to a date time picker,
i have a form that i have the employee name and all the emaloyee details such as the employee DOB. whena user selects a user from the combo box the details from the database is being taken and displayed in the form. that thing is i have a date time picker and in the form load i have the code

dpDOB.Format = DateTimePickerFormat.Custom;
            dpDOB.CustomFormat = " ";

and in the datetime picker close up i have the code

dpDOB.Format = DateTimePickerFormat.Short;

and when it shows the data the datetime picker value does is not displayed, i have to click the datetime picker for the value to show up

how can i solve this.

thanks

 
0
 

Add this line:
dpDOB.Format = DateTimePickerFormat.Short;
to the code that draws the info from the database. Just place under the rest and it should work. The problem at the moment is that you only have it in the dateTimePicker code segment which is only getting called when you click on it.

 
0
 

Add this line:
dpDOB.Format = DateTimePickerFormat.Short;
to the code that draws the info from the database. Just place under the rest and it should work. The problem at the moment is that you only have it in the dateTimePicker code segment which is only getting called when you click on it.

thanks

Question Answered as of 2 Years Ago by hericles
You
This question has already been solved: Start a new discussion instead
Post:
Start New Discussion
View similar articles that have also been tagged: