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.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.