kashfia
New member
- Joined
- Oct 27, 2010
- Messages
- 1
- Programming Experience
- Beginner
Hi,
I am using datetimepicker control.
Initially I am setting
DateTimePicker1.CustomFormat = " "
DateTimePicker1.Format = DateTimePickerFormat.Custom
then it showing a blank control.
Then when I want to select a date from pop-up calender I am using the following code at valuechanged event.
Public Class Form1
Private Sub DateTimePicker1_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DateTimePicker1.ValueChanged
DateTimePicker1.CustomFormat = "yyyyMMdd"
DateTimePicker1.Format = DateTimePickerFormat.Short
End Sub
End Class
But the problem is the pop-up calendar does not disappearing automatically. I have to click the mouse outside. then it disappears and the date is shown in the control.
Can anyone help me on this issue.
thanks
Kashfia
I am using datetimepicker control.
Initially I am setting
DateTimePicker1.CustomFormat = " "
DateTimePicker1.Format = DateTimePickerFormat.Custom
then it showing a blank control.
Then when I want to select a date from pop-up calender I am using the following code at valuechanged event.
Public Class Form1
Private Sub DateTimePicker1_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DateTimePicker1.ValueChanged
DateTimePicker1.CustomFormat = "yyyyMMdd"
DateTimePicker1.Format = DateTimePickerFormat.Short
End Sub
End Class
But the problem is the pop-up calendar does not disappearing automatically. I have to click the mouse outside. then it disappears and the date is shown in the control.
Can anyone help me on this issue.
thanks
Kashfia