datetimepicker topic

xswzaq

Well-known member
Joined
Jul 9, 2007
Messages
61
Programming Experience
Beginner
I have a monthcalender which is link to a textbox. Like if I choose 6/27/2007 in the monthcalender that select date will appear in my from_datetxtbox. It is fine, but somehow after I delete it and when I click other combobox or button, the date automatically appear on from_datetxtbox. Even if I delete the text, after 5 to 10 second, the date automatically appear on the from_datetxtbox. Is there a way to make the date disappeard unless I personally pick the day? and if I delete it, it won't appear again unless I click the monthcalender to choose/pick different date.

Thank you.
 
Last edited:
what's the code you are using to put the date from the DTP into the textbox???

If you use DateTimePicker_ValueChanged Event, it means that once the value (date) is changed in the DTP, whatever code you use is run.

I.E.
VB.NET:
Private Sub DateTimePicker1_ValueChanged (byVal ...................)

me.textbox1.text = me.dateTimePicker1.value

End Sub

will mean that when the value of the DTP changes, that value is written to the textbox....
 
This is my code:

VB.NET:
Private Sub From_DateCalendar_DateChanged(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DateRangeEventArgs) Handles From_DateCalendar.DateChanged
        Me.fromDateTxtBox.Text = Me.From_DateCalendar.SelectionStart.Date.ToShortDateString
        Me.fromDateTxtBox.Text = e.Start()
 End Sub
 
I don't have/see DateTimePicker_ValueChanged Event and when i use value in monthcalendar_DateChanged Event, it will me error. Value is not member of system....

And One more thing, I am so sorry, but I delete the datetimepicker and use monthcalender now. Is it make any different?
 
Back
Top