Hi,
We are using a UltraDateTimeEditor with a mask input of "mmm-yyyy".
When user clicks the drop down it is showing current date is the date field. that means 28th is the selected date. i want to show last date of the month is selected. For example if Month is JAN, then 31st is the selected date. if it is the FEB-2009 then 28th is the selected date like that.
If i didn't use any mask input and In Format String if i set "MMM-yyyy" then what ever i selected before that date is showing properly. But if i place the cursor in the UltraDatTimeEditor it is showig full date format that is 31-JAN-2009. If i lost focus from the editor it is showing JAN-2009.
For that purpose only i set mask property to "mmm-yyyy".
Please help me out to resolve this issue.
Thanks and Regards,
S.Santhanamahalingam.
Hi
i have the same problem
I need to have a mask input with month and year in ultradatetimeeditor or else i need ultracalendarcombo with hiding dropdown button?
because i have to select month and year only.
if you have any suggestions for selecting month and year only ?
There's no Month + Year only functionality in either of these controls.
And the UltraCalendarCombo doesn't natively support hiding the DropDownButton. But it can be done using a CreationFilter.
public class NoDropDownButtonCreationFilter : IUIElementCreationFilter { #region IUIElementCreationFilter Members void IUIElementCreationFilter.AfterCreateChildElements(UIElement parent) { if (parent is CalendarComboEditorUIElement) { UIElement calendarDropDownButtonUIElement = parent.GetDescendant(typeof(CalendarDropDownButtonUIElement)); UIElement editorWithTextUIElement = parent.GetDescendant(typeof(EditorWithTextUIElement)); // Remove the dropdown button. parent.ChildElements.Remove(calendarDropDownButtonUIElement); // Set the Rect of the EditorWithTextUIElement to fill the empty space left by the button. editorWithTextUIElement.Rect = parent.RectInsideBorders; } } bool IUIElementCreationFilter.BeforeCreateChildElements(UIElement parent) { // Do nothing return false; } #endregion }
It is still possible to toggle the dropdown via the keyboard, though. So you will need to handle that by modifying the KeyActionMappings.
private void Form1_Load(object sender, EventArgs e) { this.ultraCalendarCombo1.CreationFilter = new NoDropDownButtonCreationFilter(); KeyActionMappingBase[] kams = new KeyActionMappingBase[this.ultraCalendarCombo1.KeyActionMappings.Count]; this.ultraCalendarCombo1.KeyActionMappings.CopyTo(kams, 0); foreach (KeyActionMappingBase kam in kams) { if (kam.ActionCode is CalendarComboAction) { if ((CalendarComboAction)kam.ActionCode == CalendarComboAction.ToggleDropDown) { this.ultraCalendarCombo1.KeyActionMappings.Remove(kam); } } } }