Rank: Newbie Groups: Member
Joined: 3/27/2008 Posts: 5
|
.NET 4.0 asp.net. I create the control dynamically in code. It only acts this way under 1 condition.
Setup: Set the controls date value to MinValue or nothing - same error occurs. No date, because the value of the record has no date. Then, set the control to a date and save the value to my record. Then, reload the page using the new value.
Issue: The date control shows blank again.
Testing: Using the tooltip, I have verified that proper date is being passed to the control. The tooltip shows the proper date, the display shows nothing.
Dim dp As New EO.Web.DatePicker
If IsDate(iControlValue) Then dp.SelectedDate = DateValue(iControlValue).ToShortDateString dp.VisibleDate = DateValue(iControlValue).ToShortDateString Else dp.SelectedDate = DateTime.MinValue dp.VisibleDate = DateTime.MinValue End If
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,196
|
Hi,
Your code looks fine. You only need to set SelectedDate, but setting VisibleDate does not matter. Can you create a test page to demonstrate the problem? Once we have that we will try to run it here to see what we can find.
Thanks!
|