DateTimePicker -- I would like it to display the current date while still being able to change it.
Posted on 2012-03-11
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