Hi,
I am using an UltraCalendarCombo (version 10.1) control in one the windows application. This application is built for users mainly from US continent. Hence we have set the display format based on US standards: MM/dd/yyyy
One of the users is facing an issue with the application. Screen's which use the above control is throwing an error " Specified cast is not valid "
Tryring to debug the issue, i came across the following problem (Describing it in steps):
1. We have set the following properties for the UltraCalendarCombo Control
A. Allow Null: False
B. Format: MM/dd/yyyy
2. Set some date in the above format to the "Value" property.
3. After this try to modify the value by clicking the down arrow key at the right corner of the entry field. An error is thrown
4. The default value of the "Format" property is "d" and the for "Value" property is "5/10/2011 12:00:00 AM" (Date and Time are part of it). When i try to reset the values of these properties to their default values and then try to click on the down arrow key at the right corner still get error as "Specified cast is not valid"
I have attached a sample application for further reference.
Note: When we run the application no error is thrown, only when we try to change the value from the designer this error is thrown.
Can anyone have a look at this and suggest where i am going wrong?
We just want to achieve the following: Set the display format for the date control to MM/dd/yyyy, and this should work for any user accessing the application irrespective of their geographical location.
Stack Trace on Client machine where error is thrown is as follows:
Error: Specified cast is not valid.
Process Name: Infragistics2.Win.UltraWinSchedule.v10.1Win32 Thread Id: at Infragistics.Win.UltraWinSchedule.UltraCalendarCombo.IsDateValid(Object newValue, DateValidationError& reason) at Infragistics.Win.UltraWinSchedule.UltraCalendarCombo.set_Value(Object value)
Thanks,
Narasimha
Adding couple of screen shots
Hello ,
I have created a case for you in our system, in order to investigate this issue further for you. The support ticket id is CAS-65121-HPVGFT. I will update you for the progress of this issue via the case.
Thank you.
I'm encountering this crash as well when my product which uses this control is run on a machine that has the Operating System default date format set to "dd-MMMM-yy".
What is the status of this issue? Is a fix available?
jb
Hi Jb,
The issue with the calender combo control has been addressed from 10.2 onwards... so if you are using earlier version try upgrading to this and see.
In my application the date formatting issue for different regions i addressed it through the use of CultureInfo class: (Date format in DB was MM/dd/yyyy, we had to change the display format in the UI and the entry value based on the user region (US/ UK / Hong Kong) )
dtFrom.Value =
.GetCultureInfo(
System.Globalization.
CultureInfo.CurrentCulture.Name
));
Hope this helps.