Hi guys, I am using an UltraDateTimeEditor on my form but for some strange reason when using the up/down year spinner on the calendar the text goes invisible! What can possible be the problem? Please see the Picture attached!
Unfortunately, this is not something that we have control over, since it is a .NET MonthCalendar that is shown. I can reproduce the same issue when I just place a MonthCalendar on a form without any Infragistics references. It does seem that once you click into the calendar area, the rest of the dates show up again, but trying to force the calendar to redraw itself when changing the date doesn't seem to have any effect.
-Matt
You might want to consider using UltraCalendarCombo instead of UltraDateTimeEditor. It's a nicer-looking control, anyway. :)
Hi guys, we managed to solve this problem!
private void dtpDateOfBirth_ValueChanged(object sender, EventArgs e){ dtpDateOfBirth.DateTime = (DateTime)dtpDateOfBirth.Value;}
When user selects the date in the control and deletes it manually then null refeerence exception appears.
private void dtpDateOfBirth_ValueChanged(object sender, EventArgs e){ if (dtpDateOfBirth.Value != null) { dtpDateOfBirth.DateTime = (DateTime)dtpDateOfBirth.Value; } }
I know this is an old thread but hopefully I can still get some help. What would be the equivalent in VB.net, I cant seem to get anything to work that is along the same line as the mentioned code above. I am new to VB.net so any help would be appreciated.
Pretty much exactly how it was shown above.
Private Sub UltraDateTimeEditor1_ValueChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles UltraDateTimeEditor1.ValueChanged
If Not UltraDateTimeEditor1.Value Is Nothing Then
UltraDateTimeEditor1.DateTime = CType(UltraDateTimeEditor1.Value, DateTime)
End If
End Sub
Hi
Can u send me ur code or ur application sample using that code?
Asad
Thanks, I was close just didnt realize I could cast as datetime. Didnt seem to fix the invisible dates though.
The VB equivalent would look something like this:
Private Sub UltraDateTimeEditor1_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles dtpDateOfBirth.ValueChanged If Not dtpDateOfBirth.Value Is Nothing Then dtpDateOfBirth.DateTime = CType(dtpDateOfBirth.Value, DateTime) End If End Sub