L
Lloyd Sheen
I am having a problem with the month/day settings of the calendar control.
I have a SQL Server 2000 providing a date which is displayed in a text box
correctly. There is a button beside the textbox to allow the user to popup
the calendar control.
There are 2 problems.
1. The month/date are reversed when setting the date in the calendar as
follows:
Me.Panel1.Visible = True
Dim pdDate As Date
pdDate = Convert.ToDateTime(Me.originatingDate.Text)
Calendar1.SelectedDate = pdDate
2. The opposite of the above when attempting to put selected date back to
the text box.
Dim pdDate As Date = Calendar1.SelectedDate
originatingDate.Text = CStr(pdDate)
Me.Panel1.Visible = False
Any ideas?
Lloyd Sheen
I have a SQL Server 2000 providing a date which is displayed in a text box
correctly. There is a button beside the textbox to allow the user to popup
the calendar control.
There are 2 problems.
1. The month/date are reversed when setting the date in the calendar as
follows:
Me.Panel1.Visible = True
Dim pdDate As Date
pdDate = Convert.ToDateTime(Me.originatingDate.Text)
Calendar1.SelectedDate = pdDate
2. The opposite of the above when attempting to put selected date back to
the text box.
Dim pdDate As Date = Calendar1.SelectedDate
originatingDate.Text = CStr(pdDate)
Me.Panel1.Visible = False
Any ideas?
Lloyd Sheen