"Date Time Picker" 's Click event NOT FIRED

Obuli

Member
Joined
May 4, 2006
Messages
5
Programming Experience
1-3

In VB.NET Form,i am using Date Time Picker

How to fire "Date Time Picker" 's Click and "Double Click" events...

It seems these events are not fired..

any one please help me ..

thanks in advance
http://www.dnzone.com
 
Private Sub DateTimePicker1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles DateTimePicker1.Click
End Sub

is this what you looking? you can find the DateTimePicker click event in the Method.
 
Why do you want the Click event to be raised on a DateTimePicker? The calendar is dropped-down automatically and you'd normally just click the body to set the date manually. What is it that you're trying to achieve?
 
I need to display selected (picked ) date in TextBox

actually i need to display the PICKED DATE in TextBox,It is working fine with CloseUp event of DatePicker,BUT I DO NOT WANT CloseUp eventPrivate Sub DateTimePicker1_CloseUp(ByVal sender As Object, ByVal e As System.EventArgs) Handles DateTimePicker1.CloseUpEnd SubI need to display selected (picked ) date in TextBox
 
Then you should be handling the ValueChanged event, which is raised every time the Value property changes. The Value property is what contains the the selected date and/or time so when it changes is when you would want to update your TextBox.

Note that the user can set a date/time in the control without using the drop-down calendar or clicking the control with the mouse. You can use the Tab key to enter the control, set the date with the keyboard and then Tab out again. No mouse involved so no Click event could possibly be raised, but the ValueChanged will be raised when the focus leaves the control.
 
Back
Top