[2005] DatetimePicker scrolling issue!
My problem is the automatic update of the date in the display area when scrolling the Datetimepicker by e.g month or by year. I haven't actually selected a date, so if i decide to cancel the selection it will retain the most recent scrolled date. I want it to default to the original date if I don't actually select one by clicking on the required date. Hope that makes sense.
Thanks in advance,
Maria
Re: [2005] DatetimePicker scrolling issue!
VB Code:
Private dteDatePicker As DateTime
Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
dteDatePicker = Me.DateTimePicker1.Value
End Sub
Private Sub btnCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCancel.Click
Me.DateTimePicker1.Value = dteDatePicker
End Sub
Private Sub btnCommit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCommit.Click
dteDatePicker = Me.DateTimePicker1.Value
End Sub