This is a migrated thread and some comments may be shown as answers.

Date Format Crash

11 Answers 139 Views
DatePicker
This is a migrated thread and some comments may be shown as answers.
James
Top achievements
Rank 1
James asked on 24 Oct 2009, 10:41 PM
Hello,

I'm getting an exception thrown when focus is lost when using this date pattern:

            var cultureInfo = new CultureInfo("en-US");  
 
            var dateInfo = new DateTimeFormatInfo();  
            dateInfo.ShortDatePattern = "dddd, d MMMM yyyy";  
            cultureInfo.DateTimeFormat = dateInfo;  
            dpMain.Culture = cultureInfo; 

This is the same format as the MS Toolkit Calendar control, it would be great to use this as it is much more readable than mm/dd/yyyy.

Am I doing something wrong or is this format not supported yet? As mentioned, it only occurs when focus is lost, it actually displays fine in the TextBox up until that point.

Message: Unhandled Error in Silverlight Application
Code: 4004   
Category: ManagedRuntimeError      
Message: System.NullReferenceException: Object reference not set to an instance of an object.
   at Telerik.Windows.Controls.DatePicker.DateTimeParsing.DateTimeEvaluator.GetFirstAvailablePosition(Token token, Dictionary`2 inputBuckets)
   at Telerik.Windows.Controls.DatePicker.DateTimeParsing.DateTimeEvaluator.Distribute(Token[] originalTokens)
   at Telerik.Windows.Controls.DatePicker.DateTimeParsing.DateTimeEvaluator.GetDate(Token[] tokens, DateTime date)
   at Telerik.Windows.Controls.DatePicker.DateTimeParsing.TripletEntry.Evaluate(DateTime currentDate, FormatInfo formatInfo)
   at Telerik.Windows.Controls.DatePicker.DateTimeParsing.DateTimeEntry.Evaluate(DateTime currentDate, FormatInfo formatInfo)
   at Telerik.Windows.Controls.RadDatePicker.ParseDateAndUpdateTextBox()
   at Telerik.Windows.Controls.RadDatePicker.OnInputBoxLostFocus(Object sender, RoutedEventArgs e)
   at System.Windows.CoreInvokeHandler.InvokeEventHandler(Int32 typeIndex, Delegate handlerDelegate, Object sender, Object args)
   at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, String eventName)

Kind Regards,
James.

11 Answers, 1 is accepted

Sort by
0
Kaloyan
Telerik team
answered on 26 Oct 2009, 11:13 AM
Hi James,

Thank you for your feedback. Unfortunately the RadDatePicker is using an internal date parser system which is not fully supporting all of the known date formats. The requested by you date format is part of the not supported from the control ones.We will consider some improvements in the future version of the control, in order ti support various date formats. Hope this is knot a showstopper for your application. Let us know if you need any further assistance.

All the best,
Kaloyan
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Norman Girardin
Top achievements
Rank 1
answered on 19 May 2010, 10:10 PM
I'm still getting this problem in the Q1 2010 release. Is this going to be fixed anytime soon?
0
Kaloyan
Telerik team
answered on 21 May 2010, 09:39 AM
Hello Norman Girardin,

We are working on some improvements of the parsing system of the control. Sorry for any problem caused.

Sincerely yours,
Kaloyan
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Adrian Russell
Top achievements
Rank 1
answered on 15 Jun 2010, 05:58 AM
Hi,

I am getting a similar problem with the date picker for format dd-MMM-yyyy ddd.

Is there any expectation that this will be fixed in the next month ?

Thanks,

Adrian

0
Kaloyan
Telerik team
answered on 16 Jun 2010, 11:17 AM
Hello Norman Girardin,

The format that you are using is a part of the not supported ones. Currently the development of this control is frozen as all of our effords are dedicated to our new RadDateTimePicker control. It supports all of the valid DateTime formats and also will have feature to use it as a DateTimePicker, DatePicker or TimePicker.

Sincerely yours,
Kaloyan
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Atsushi
Top achievements
Rank 1
answered on 09 Jul 2013, 02:58 AM
Hello,

I'm getting the same problem as others by the same format as Adrian. So, I'd like to know about the following points:
  1. The RadDateTimePicker control (Kaloyan said) does not have this kind of problem?
  2. Is there the list of formats supported by the RadDatePicker?

Best regards,
Atsushi Kambara
0
Vladi
Telerik team
answered on 11 Jul 2013, 01:40 PM
Hi,

Most of the valid time and date format parsings are supported in the current version of RadDateTimePicker and RadDatePicker controls. You can check this help article that describes how to customize the display format of the controls and this about the available Military DateTime Parsing.

You can also check our online demos here.

Regards,
Vladi
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Atsushi
Top achievements
Rank 1
answered on 12 Jul 2013, 02:53 AM
Hello Vladi,

Thank you for your reply. The links you pointed are very useful.

But I am using the version "2010.1.603.1030" and getting an error by the format "MM/dd/yyyy ddd". I cannot upgrade the version. May I have the list of supported formats in the version?

Best regards,
Atsushi Kambara
0
Atsushi
Top achievements
Rank 1
answered on 12 Jul 2013, 02:55 AM
Hello Vladi,

Thank you for your reply. The links you pointed are very useful.

But I am using the version "2010.1.603.1030" and getting an error by the format "MM/dd/yyyy ddd". I cannot upgrade the version. May I have the list of supported formats in the version?

Best regards,
Atsushi Kambara
0
Vladi
Telerik team
answered on 15 Jul 2013, 01:43 PM
Hi,

As the version of the assemblies that you are using is a very old one there have been some major improvements to the RadDatePicker control and it is strongly recommended to update the one of our latest versions if possible.

Unfortunately we do not have such a resource that lists all of the supported parsing formats of that old version of the control. All of the normal separator parsings should be available in the control if the correct DateTimeFormat or culture is set. You should note that the Military parsing is a new feature that is not available in the version that you are using.

Regards,
Vladi
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Atsushi
Top achievements
Rank 1
answered on 23 Jul 2013, 10:00 AM
Hello,

Thank you for your reply. Unfortunately, the information you provided did not help my situation, but I appreciate your support.

Best regards,
Atsushi Kambara
Tags
DatePicker
Asked by
James
Top achievements
Rank 1
Answers by
Kaloyan
Telerik team
Norman Girardin
Top achievements
Rank 1
Adrian Russell
Top achievements
Rank 1
Atsushi
Top achievements
Rank 1
Vladi
Telerik team
Share this question
or