Hi Support Team,
I have a requirement where i need to show Date with same format in both display and edit mode. (For e.g. like Nov 12, 2013). I tried out in the DateTimeEditor but could not achieve it. Is it possible achieve this?
If it is not possible then can you let us if it is possible by any other approach.
I have shown in the image.
Hi,
No, there's no easy way to do that. You could use an UltraTextEditor and add a DropDownEditorButton to it's ButtonsRight collection and then put a Microsoft DateTimePicker control on the dropdown. But you would have to code all of the interaction and parsing that the DateTimeEditor or UltraCalendarCombo give you.
I think UltraCalendarCombo looks better than the inbox control, and it certainly has a lot more support for styling and such. But if you must use the inbox control, then you could use UltraDateTimeEditor and then set the Format so that it matches the mask: "mm/dd/yy"
That way it will look the same in edit mode as out. But you can't use the letter format for the month.
Hi Mike,
Thanks for your prompt reply and suggestion.
As you suggested me to use the UltraCalendarCombo, I have already tried out the control. The issue in the CalendarCombo is that, although it gives me the same format in edit and display mode; but the appearance of the calendar in dropdown differs with the datetimeeditor (i.e. the calendar style). The calendar style like Windows 7 system calendar style which in the datetimeeditor. Is it possible to apply the same calendar appearance for CalendarCombo similar like datetimeeditor.
I need it to show calendar style as shown in the image.
Please let me know if there is any easier solution to achieve this.
Thank You.
Actually... it just occurred to me that the control might be picking up the format from the Operating system, so it might not always be the same by default.
There's no way to show the format you have here when the control is in edit mode. When in edit mode, the control uses a masked input and the mask cannot accept letters for the month like this.
If that's the format you need, then you might want to consider using UltraCalendarCombo instead of UltraDateTimeEditor. The CalendarCombo doen't use a mask - it's freeform text entry, so it can support a format like you want here.
The control displays the date using the same format by default. So if it's not showing the same, it's because you changed it. In the screen shots you have here, it looks like you set the FormatString property to change the format when the control is not in edit mode. So just don't do that and it will look the same in both cases.