Change date in a calendar control

otuatail

Active member
Joined
May 25, 2011
Messages
28
Programming Experience
5-10
Hi. (VS 2008) I have 2 Forms.MonthCalander (DateFrom. DateTo) and a text box (txtSearch)
I want to advance DateTo by the value of txtSearch
What I have so far is this.

Private Sub cmdFindDay_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdFindDay.Click
Dim Days As Integer = 0
Dim NewDay As Date
Days = Convert.ToInt32(txtSearch.Text)
NewDay = DateFrom.TodayDate
NewDay = NewDay.
End Sub


HELP
 
Last edited:
Ok I think I have got somewhere with it (don't know how NEWBY)

Dim Days As Integer = 0
Dim NewDay As System.DateTime
Days = Convert.ToInt32(txtSearch.Text)
NewDay = DateFrom.TodayDate
NewDay = NewDay.AddDays(Days)
DateTo.TodayDate = NewDay

But the calendar does not move to the next month if the value is > 26
 
Back
Top