I've changed the format string in a date time editor, and it works as expected.
ultraDateTimeEditorStart.FormatString = "yyyy/MM/dd";
However, when this component receives focus its format is changed back to a default "MM/dd/yyyy"
Is there a setting I am missing?
Hello,
In order to achieve what you are looking for you could set the MaskInput property like:
ultraDateTimeEditor1.MaskInput = "yyyy/mm/dd";
Please let me know if you have any further questions with this matter.
I tried the above suggestion. When the editor receives focus it now shows "yyyy/MM/dd", literally, with no date.Perhaps I am still missing something?
Hello ,Probably because you are using still "MM" instead of "mm". Could you please try to set the MaskInput property like the following:
Please let me know if you still need any further assistance.
The control exposes a ButtonAppearance property, which applies to all buttons being displayed by the control. If you are not displaying editor buttons, and only the dropdown button is visible, you could use this appearance to display an image instead of the default dropdown glyph:
// Suppress theming or the button will be drawn by the operating system, in which case the image will not be displayed this.ultraDateTimeEditor.ButtonAppearance.ThemedElementAlpha = Alpha.Transparent;
// Assign the Image reference to the ButtonAppearance.Image property.
this.ultraDateTimeEditor.ButtonAppearance.Image = myImage;
// Optionally use flat mode to prevent the default 3D button appearance.
this.ultraDateTimeEditor.UseFlatMode = DefaultableBoolean.True;
Hi Mike,
I have used both the controls to test that which control fits our requirements.
After testing both the controls, finally decided to go with "UltraDateTimeEditor" as it fits best for our requirements.
I am able to accommodate all the requirements related to "UltraDateTimeEditor" with your great support.
I have only one issue now that is replacing "Dropdownbutton" of UltraDateTimeEditor with calendar icon.
I have seen your comment on one post that says "I beleive you would need to use a CreationFilter or DrawFilter for this."
Could you please provide me a sample to set image inplace of "DropdownButton" of UltraDateTimePicker.
Your help is much appreciated.
Thanks,
-Siva
Hi Siva,
Are you using UltraDateTimeEditor? I thought you were using UltraCalendarCombo... that's what your sample in your other post was using.
Thanks for your reply.
I have used latest dll's. It is working fine now.
I tested this out and it seems to work correctly for me. The CalendarCombo shows the correct date. I tested this with both a standalone UltraCalendarCombo and a grid cell with an UltraCalendarCombo and it works fine for me in both cases.I have attached my sample project here so you can see if you get the same results.
If my sample gives you the same problem, then there are two possibilities that I can see.
1) You are using a version of the control which has a bug in it.
2) This might be related to the system regional settings. I'm using English US.
To answer your question, I think the best event to use would be the BeforeExitEditMode event. For the grid cell, you would use cell.Editor.Text to either get or set the cell's text.