Hi, team
Recently I used the control ultraCalendarCombo and got a question.
When I input some value in the ultraCalendarCombo, I can't get the value that I just inputed.
Is it the property of ultraCalendarCombo.value?
e.g the value that I inputed
h090401s640201s041220t150101m3003031995.9.11995-09-011995.9-01
But with the format like "1995/09/01", that I could get the value.
I was wondering if it's prossible that I could get whatever the formated date I input when I using ultraCalendarCombo?
Could you please help me with that?
Thanks for your concern.
Hi Richard,
If you enter invalid value then it takes the old value by ignoring the value you just have entered.
You can capture the value that you just have entered on "ValidationError" event and modify.
Ex:
this.ultraCalendarCombo1.ValidationError+=ultraCalendarCombo1_ValidationError;
private void ultraCalendarCombo1_ValidationError(object sender, DateValidationErrorEventArgs e) { string enteredValue = this.ultraCalendarCombo1.Text; }
Hi, Siva Sankar
Thanks for replying. And I've got the error format date value in enteredValue, and change them like strings below.
平成26年12月平成07年09月03日1995年09月03日不明2014年12月2014年
What if I just want to set these values to the ultraCalendarCombo controls, is that prossible to implement?
Hi, Dimitar
Thanks for replying. With the request return back, I'm still trying with this.
And I was wandering if I want to show the value "平成27年04月28日" in the ultraCalendarCombo, is it possible to implement that?
Does it have to like the topic below:
http://ko.infragistics.com/community/forums/t/95554.aspx
Could you please help me with that? Thanks for your concern.
P.S. "平成27年04月28日" is actually Japaness calendar, and in culture "en-US" it's "2015/04/28".
Hi Siva,
Thank you very much for your suggestions in this thread.
Richard, do you have any additional questions on this matter?
I am looking forward to hearing from you.
Try to parse the value which you entered to DateTime. If parsing is success then you can set that as Value of UltraCalenderCombo.
private void ultraCalendarCombo1_ValidationError(object sender, DateValidationErrorEventArgs e) { string enteredValue= this.ultraCalendarCombo1.Text; DateTime ValueAfterParse; bool ValidDate = DateTime.TryParse(enteredValue, out ValueAfterParse); if (ValidateDate) { this.ultraCalendarCombo1.Value = ValueAfterParse; } }
Thanks,
-Siva