Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

dateTimePicker ValueChange

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
like image 741
PaulPolon Avatar asked Mar 23 '26 15:03

PaulPolon


1 Answers

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
like image 185
Umesh Avatar answered Mar 26 '26 13:03

Umesh



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!