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
120
Calendar with year drill through
posted

Hi

I'm looking to create a custom filter control to use on a popup container control. Essentially I want two calendars side by side where a user can select a start and end date, one from each calendar. I also want them to have the ability to select the start year without having to scroll through years of dates to find the date in a particular year. The standard windows forms date time picker has this functionality but I haven't found an infragistics calendar control with this functionality (so if you click on the month in the heading it drills to the months with the year on top then you can drill through the years) . I've tried the UltraMonthViewSingle control that comes close as it doesn't require drop down but cant see a way of displaying the year and drilling through them.

Any advice would be appreciated.

Cheers

Dave

Parents
  • 1500
    Offline posted

    Hello Dave,

    I would like to suggest using UltraDateTimeEditor, which is based on MS MonthCalendar. However, there is only one calendar in the dropdown of the component, so you can use two of them, and bind the startDate and endDate and make sure the startDate is before the endDate.

    The other option which I can offer is using ultraTextEditor and modifying the DropDownEditorButton to contain two calendars. You can use a panel to hold them so it will look like this:

                this.tableLayoutPanel1.Controls.Add(this.monthCalendar1);
                this.tableLayoutPanel1.Controls.Add(this.monthCalendar2);
    
                DropDownEditorButton editorButton = new DropDownEditorButton();
                editorButton.Control = this.tableLayoutPanel1;
    
                this.ultraTextEditor1.ButtonsRight.Add(editorButton);

    In this case it would be best if you do not allow the user to be able to write in the editor and have him select dates from the calendars.

    Please let me know if you need help implementing any of the ideas above, and I will be happy to assist you.

    Sincerely,
    Tihomir Tonev
    Associate Software Developer
    Infragistics

Reply Children