Reputation: 13
i would like to select date from month calender in vb.net
i need to select different date for (ex: 6/11/2014) and get it then work with it in my case i can select just the current date (6/3/2014), i used the code bellow so anyone can advise???
Private Sub MonthCalendar1_DateChanged(sender As Object, e As DateRangeEventArgs)
Handles MonthCalendar1.DateChanged
Dim str As String
str = MonthCalendar1.TodayDate.ToString
MsgBox(str)
End Sub
any update will be highly appreciated
Upvotes: 0
Views: 5699
Reputation: 11
Private Sub calMonth_DateSelected(sender As Object, e As DateRangeEventArgs) Handles calMonth.DateSelected
Dim sMonthSelected As String 'I have this under my Public class
sMonthSelected = calMonth.SelectionRange.Start.Date.ToString("yyyyMMdd")
MsgBox(sMonthSelected) ' or whaterver output you require
End Sub
Upvotes: 1