I need a control that is essentially a text box where the user can enter any text value, but I want a drop-down button that will display a calendar from which the user can select a date. If a date is selected, the date's text value is placed into the editor control.
I tried both the UltraDateTimeEditor and the UltraCaledarCombo. Both of these controls require that only dates be entered. As far as I can tell, there's no way to allow the user to enter anything other than a date.
The UltraTextEditor can show custom editor buttons, including a drop down, but I can't figure out how to have the drop down show a date-picker control.
How would I implement this functionality?
.
Hello Scott,
Yes you are right about UltraDateTimeEditor and the UltraCaledarCombo, only date can be entered.
Regarding using UltraTextEditor and adding date control into it , I believe you can refer to these post discussing the same requirement:
https://www.infragistics.com/community/forums/f/ultimate-ui-for-windows-forms/3163/how-to-force-an-ultratexteditor-s-dropdowneditorbutton-click-on-keydown-event/29550
https://www.infragistics.com/community/forums/f/ultimate-ui-for-windows-forms/107705/globalisation-feature-in-date-control-ultradatetimeeditor-ultracalendarcombo
Hope these post would help.
The first post you mentioned does address the question in general. The use of the UltraMonthViewMulti control doesn't seem like the right fit as that control is about displaying things in a calendar, not just picking a date. I did discover, however, that the build-in MonthCalendar control is what the UltrDateTimeEditor uses in its drop down and fits our needs. So I've just added a drop-down button to an UltraTexiEditor and set its Control property to a MonthCalendar control. On the MonthCalendarControl's DateSelected event, I set the text of the UltraTextEditor and call its CloseEditorButtonDropDowns() method.