Results 1 to 2 of 2

Thread: [2005] DatetimePicker scrolling issue!

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2008
    Posts
    6

    [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

  2. #2
    Hyperactive Member syntaxeater's Avatar
    Join Date
    Dec 2006
    Location
    Des Moines, IA
    Posts
    460

    Re: [2005] DatetimePicker scrolling issue!

    VB Code:
    1. Private dteDatePicker As DateTime
    2.     Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    3.         dteDatePicker = Me.DateTimePicker1.Value
    4.     End Sub
    5.     Private Sub btnCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCancel.Click
    6.         Me.DateTimePicker1.Value = dteDatePicker
    7.     End Sub
    8.     Private Sub btnCommit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCommit.Click
    9.         dteDatePicker = Me.DateTimePicker1.Value
    10.     End Sub

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width