We help IT Professionals succeed at work.

DateTimePicker  --  I would like it to display the current date while still being able to change it.

jampost
jampost asked
on
The  DateTimePicker works fine with the code displayed below, except I always have to change it to whatever date I want. Many times the date I want is the current date, but not always.  I would like it to display the current date while still being able to change it.  Thank you for any help
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Private Sub DateTimePicker1_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DateTimePicker1.ValueChanged

        DateTimePicker1.Format = DateTimePickerFormat.Custom
        DateTimePicker1.CustomFormat = "MM-dd-yyyy    "
        TextBox8.Text = DateTimePicker1.Value.Date

    End Sub
Comment
Watch Question

Commented:
assign Date.ToDay as the value of your datetimepicker on form load
jampostGeneral Maanager

Author

Commented:
nepaluz:

Sorry, I got side track for a while.  Thank you, it worked.

Explore More ContentExplore courses, solutions, and other research materials related to this topic.