Hi,
if I use the XamDateTimeEditor in dropdown calendar mode and select a date using the calendar, only the date will be set and the time is left empty. Leaving the editor will present the message "The value in the editor is not valid".
How can the time be set to 00:00:00 by default or in code behind after using the calendar?AutoFillDate would be fine for time also...
And how could the above error message could be supressed and handle by my own?
If I use_EditModeValidationError-Event and set e.Handled=true, the messagebox still occurs.
best regards,
cew3
Hello,
I am just checking if you got this worked out or you still require any assistance or clarification on the matter.
I have modified the sample I sent you before, so now it has the functionality you want. Basically I changed the Mask of the DAteTimeEditor and add a null check in the XamMonthCalendar’s SelectedDateChanged event. Please let me know if this helps you or you need further assistance on this matter.
Looking forward for your reply.
Hi Stefan,
in your example, there's a strange behaviour:
1. Click in the editor and type 1.1.1111 and press return-> the editor shows: 01.01.1111 12:00:00
2. Click again to the editor -> the editor shows: 01.01.1111 00:00
3. Press return or edit the value and press return and the value gets cleared. In xamDateTimeEditor1_EditModeEnding the value is NULL.
??
Best,cew3
I have been looking into your sample and I modified it, so now it works as you want. Basically I copied the default EditTempalte of the XamDateTimeEditor and handled the XamMonthCalendar’s SelectedDateChanged event in which I am able to get date and time and in the EditModeEnding event handler I set it to the editor. Please let me know if this helps you or you need further assistance on this matter.
thank you for the example.
Sorry, I forgot to say that I'm using a mask...To show my problem, I added a mask to the editor.
Please have a look..
Bestcew3