Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
360
UltraCalendarCombo calander click event question
posted

I'm using the UltraCalendarCombo  I need to set a custom property I've added to the control when a user clicks a date in the calander dropdown.  What events are raised when a user clicks date  in the calander dropdown?

John

 

Parents
No Data
Reply
  • 69832
    Offline posted

    The control's CalendarInfo property returns a reference to the component (UltraCalendarInfo) which coordinates date related information between any of the controls associated with it. That component exposes a BeforeSelectedDateRangeChange event; in the case where one day is selected, you can determine that date like so:

     this.calendarInfo.BeforeSelectedDateRangeChange += new BeforeSelectedDateRangeChangeEventHandler(calendarInfo_BeforeSelectedDateRangeChange);

    void calendarInfo_BeforeSelectedDateRangeChange(object sender, BeforeSelectedDateRangeChangeEventArgs e)
    {
        DateTime dateSelected = e.NewSelectedDateRanges.SelectedDaysCount == 1 ?
            e.NewSelectedDateRanges[0].StartDate :
            DateTime.MinValue;
    }

Children
No Data