I have a DateTimePicker and every time I want the event dtpJournalDate.ValueChanged is being called.
My problem is that, when I click the dropdown arrow, the event dtpJournalDate.ValueChange is already executing even if I have not chosen a new date yet and after I have chosen a date, it would again execute the ValueChange event. I only want the event ValueChange execute after I have chosen a date?
Private Sub dtpJournalDate_ValueChanged(sender As Object, e As EventArgs) Handles dtpParametersDate.ValueChanged
'Some Codes to do when changing the date
End Sub
Or you can change event handler in onCloseUp event
Private Sub MyDatetimePicker_ValueChanged(sender As Object, e As EventArgs) Handles Me.ValueChanged
Me.OnCloseUp(e)
'Do what ever change you want, when instance is created.
End Sub
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With