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
20
UltraCalendarCombo Date Display
posted

I've set up this control to drop down with one row of 3 months - Jan Feb and Mar calendars show. But my data is historic only so I really want Nov, Dec and Jan to show when the user hits the dropdown. I've looked at all the properties and really don't see how I can do this. We used to be able to do this withComponent One's  Flex Grid. Hope someone can assist.

 

TIA. Alan.

  • 69832
    Offline posted

    this.ultraCalendarCombo1.BeforeDropDown += new CancelEventHandler(ultraCalendarCombo1_BeforeDropDown);

    private void ultraCalendarCombo1_BeforeDropDown(object sender, CancelEventArgs e)
    {
        UltraCalendarCombo calendarCombo = sender as UltraCalendarCombo;
        UltraCalendarInfo calendarInfo = calendarCombo.CalendarInfo;
        DateTime firstOfNovember = new DateTime( DateTime.Today.Year, 11, 1 );
        calendarInfo.ActiveDay = calendarInfo.GetDay( firstOfNovember, true );
        calendarCombo.FirstMonth = calendarInfo.GetMonth( 11, DateTime.Today.Year );
    }