How can I get the time slot the user double clicked on from the ultradayview? I have it bound to an ultracalendarinfo and the selected date ranges is always empty.
void dayView_MouseDoubleClick(object sender, MouseEventArgs e){ UltraDayView dayView = sender as UltraDayView; TimeSlot timeSlot = dayView.GetTimeSlotFromPoint( e.Location ); VisibleDay visibleDay = dayView.GetVisibleDayFromPoint( e.Location );
if ( visibleDay != null && timeSlot != null ) { System.Globalization.DateTimeFormatInfo dateFormatInfo = System.Globalization.CultureInfo.CurrentCulture.DateTimeFormat;
string dateFormat = string.Format( "{0} {1}", dateFormatInfo.ShortDatePattern, dateFormatInfo.ShortTimePattern ); DateTime date = visibleDay.Date.Add( timeSlot.StartTime.TimeOfDay ); MessageBox.Show( date.ToString( dateFormat ) ); }}