Date Format Crash

12 posts, 0 answers
  1. James
    James avatar
    136 posts
    Member since:
    Nov 2008

    Posted 24 Oct 2009 Link to this post

    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.
  2. Kaloyan
    Admin
    Kaloyan avatar
    920 posts

    Posted 26 Oct 2009 Link to this post

    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.
  3. DevCraft banner
  4. Norman Girardin
    Norman Girardin avatar
    1 posts
    Member since:
    Dec 2009

    Posted 19 May 2010 Link to this post

    I'm still getting this problem in the Q1 2010 release. Is this going to be fixed anytime soon?
  5. Kaloyan
    Admin
    Kaloyan avatar
    920 posts

    Posted 21 May 2010 Link to this post

    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.
  6. Adrian Russell
    Adrian Russell avatar
    2 posts
    Member since:
    May 2010

    Posted 15 Jun 2010 Link to this post

    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

  7. Kaloyan
    Admin
    Kaloyan avatar
    920 posts

    Posted 16 Jun 2010 Link to this post

    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.
  8. Atsushi
    Atsushi avatar
    7 posts
    Member since:
    Aug 2011

    Posted 08 Jul 2013 Link to this post

    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
  9. Vladi
    Admin
    Vladi avatar
    744 posts

    Posted 11 Jul 2013 Link to this post

    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 >>
  10. Atsushi
    Atsushi avatar
    7 posts
    Member since:
    Aug 2011

    Posted 11 Jul 2013 Link to this post

    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
  11. Atsushi
    Atsushi avatar
    7 posts
    Member since:
    Aug 2011

    Posted 11 Jul 2013 Link to this post

    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
  12. Vladi
    Admin
    Vladi avatar
    744 posts

    Posted 15 Jul 2013 Link to this post

    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 >>
  13. Atsushi
    Atsushi avatar
    7 posts
    Member since:
    Aug 2011

    Posted 23 Jul 2013 Link to this post

    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
Back to Top
DevCraft banner