Completed
Last Updated: 25 Oct 2023 06:08 by ADMIN
Release LIB 2023.3.1106 (6 Nov 2023)

IndexOutOfRangeException is thrown when AllowParsingWithoutSeparator is set to true and an invalid date is entered. 

Examples of invalid date strings that cause the exception:

  • 10120000
  • 12 12 12
  • 1
  • a4/1/2014

There is no proper workaround, but the error is silently printed in the Output pane of Visual Studio and it doesn't break the application or the RadDatePicker control, so it can be ignored.

The exception stacktrace is the following:

System.ArgumentOutOfRangeException: Year must be between 1 and 9999. (Parameter 'year')
   at System.DateTime.DaysInMonth(Int32 year, Int32 month)
   at Telerik.Windows.Controls.MilitaryDateParser.CheckAndSetValidDate(Int32 year, Int32 month, Int32 date, DateTime& fullDate, DateTime current)
   at Telerik.Windows.Controls.MilitaryDateParser.TryParseSingleDigitDatePart(DateTime& result, DateTime current, String datePart, DayMonthYearIndecesInfo dateIndeces, CultureInfo culture)
   at Telerik.Windows.Controls.MilitaryDateParser.TryParse(String value, DateTime& result, DateTime current, CultureInfo culture)
   at Telerik.Windows.Controls.RadDateTimePicker.ParseDateTime(String text, IDateTimeParser parser, Nullable`1& dateTime)
   at Telerik.Windows.Controls.RadDateTimePicker.OnDateTimeTextChanged()
   at Telerik.Windows.Controls.RadDateTimePicker.OnDateTimeTextChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
   at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
   at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
   at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
   at Telerik.Windows.Controls.RadDateTimePicker.set_DateTimeText(String value)
   at Telerik.Windows.Controls.RadDateTimePicker.UpdateValueFromCurrentText()
   at Telerik.Windows.Controls.RadDateTimePicker.ProcessKey(KeyEventArgs e)
   at Telerik.Windows.Controls.RadDateTimePicker.OnKeyDown(KeyEventArgs e)

Declined
Last Updated: 18 Nov 2014 08:30 by ADMIN
Created by: Marcin
Comments: 5
Category: DatePicker
Type: Feature Request
2
I will be a great feature in RadDatePicker to choose formatting of date for example only by year or month and so on... - like in DatePicker for Windows 8 Xaml version.
Declined
Last Updated: 24 Jan 2014 15:41 by ADMIN
When I have in the RadDatePicker some date value (ex. 1.1.2013) and I try to change only year so, that I use dropdown window. When I select Year (ex. 2012), it goes OK. But when I change same month as current selected date, it open date calendar on January 2013. If I make same, but change different month (ex. Feb) it open date calendar OK.
Unplanned
Last Updated: 03 Aug 2016 11:17 by Lerner
Won't Fix
Last Updated: 05 Jun 2017 10:24 by ADMIN
ADMIN
Created by: Konstantina
Comments: 4
Category: DatePicker
Type: Bug Report
2