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?
Hi Mike,
I have used UltraCalenderCombo and came across one issue.
When use press "Key Down" it only decreases day value by one. I want same feature for month and year as well using UltraCalenderCombo.
Is there any way.
Please suggest.
Thanks,
-Siva
Hi Siva,
UltraCalendarCombo doesn't have a mask so it has no context for what the arrow key should do based on where the caret is. It allows you to type in free-form dates.
So you could write code to examine to text and the location of the cursor and then handle the up/down arrows yourself, but this would be extremely tricky and difficult, because you would have to somehow determine what the user wants to increase/decrease.
Thanks for your reply.
I am facing one more issue with UltraCalenderCombo. Below is my scenario.
-> I have set custom format to UltraCalenderCombo as "MMM-dd-yyyy"
-> I set initial date to the control as today date. Let's say "Jan-23-2015".
-> Now user deleted the entire date and he tries to enter "03-04-2015" and he switches to other field. Here it should convert that as "Mar-04-2015", Which is not happening.
It is converting that as "Jan-04-2015".
-> Is there any event, Where I can capture user's input(03-04-2015) and write my logic to convert that as "Mar-04-2015".
-> I tried with LostFocus event but by the time this event get fire, date is already get's convert as "Jan-04-2015".
Kindly Suggest with your inputs.
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.
I have used latest dll's. It is working fine now.
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;
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.
Are you using UltraDateTimeEditor? I thought you were using UltraCalendarCombo... that's what your sample in your other post was using.