To reproduce: 1. Add RadDateTimePicker and set these properties: this.radDateTimePicker1.ReadOnly = true; this.radDateTimePicker1.ShowCheckBox = true; 2. When run the project you will see that the checkbox is not read only. Workaround: RadCheckBoxElement checkboxelement = this.radDateTimePicker1.DateTimePickerElement.CheckBox; checkboxelement.ReadOnly = true;
Steps to reproduce: For example current date is 24th. Then selected the 19th from the datepicker popup Then increased the day from the 19th to the 22nd by pressing the up arrow 3 times. Then open the popup will see 3 dates highlighted + including today.
RadMaskedEditBox/RadDateTimePicker/RadTimePicker does not support milliseconds editing.
In ReadOnle mode no other keys do anything on the document, but the delete key deletes text/images just as it normally works.
Add a new wrapping mode that breaks the text per whole words
Allow the RadDateTimePicker editor of RadGridView to allow replacement of the months' popup. Resolution: This behavior can be achieved when set the HeaderNavigationMode property to Zoom of RadCalendar. The feature is introduced in Q2 2014. For example: void radGridView1_CellEditorInitialized(object sender, Telerik.WinControls.UI.GridViewCellEventArgs e) { RadDateTimeEditor dtEditor = e.ActiveEditor as RadDateTimeEditor; if (dtEditor != null) { RadDateTimeEditorElement element = (RadDateTimeEditorElement)dtEditor.EditorElement; element.Calendar.HeaderNavigationMode = HeaderNavigationMode.Zoom; } }
RadDateTimePicker should be able to parse custom predefined strings coverting them to a valid datetime value. The feature should be similar to the feature of the Telerik Extentions for ASP.NET MVC: http://demos.telerik.com/aspnet-mvc-beta/datepicker/dateparsing?theme=sunset
A possibility to specify the default time (to be different from 00:00) when choosing date value from the drop-down calendar.
ADD. RadDateTimePicker - add toggle state changed event for the check box
The RadDateTimePicker editor does not allow to edit milliseconds if appropriate format string is applied.
To reproduce: Add a RadDateTimePicker to a form, set your DPI settings to 150% (you will need to re-log from windows), open the form and click the arrow of the RadDateTimePicker to show the dropdown. You will notice that the dropdown is not being scaled accordingly. Workaround: Subscribe to the PropertyChanged event of RadDateTimePicker and scale the dropdown manually: Size initialPopupSize; RadDateTimePicker dateTimePicker; void DateTimePickerElement_PropertyChanged(object sender, PropertyChangedEventArgs e) { if (e.PropertyName == "IsDropDownShown") { RadDateTimePickerCalendar calendar = dateTimePicker.DateTimePickerElement.GetCurrentBehavior() as RadDateTimePickerCalendar; if (calendar.PopupControl.MinimumSize != initialPopupSize && initialPopupSize != Size.Empty) { return; } float scale = 0; float dpi = this.CreateGraphics().DpiX; if (dpi == 96) { scale = 1f; } else if (dpi == 120) { scale = 1.25f; } else if (dpi == 144) { scale = 1.5f; } else if (dpi == 192) { scale = 2f; } Size popupSize = calendar.PopupControl.Size; Size newSize = new Size((int)(popupSize.Width * scale), (int)(popupSize.Height * scale)); calendar.PopupControl.MinimumSize = newSize; initialPopupSize = popupSize; } }
There should be a mean to restrict the possible values a user can input.
Add the ability to gain focus and change the toggle state upon keypress. Add the ability to show the calendar with a key combination like Alt + DownArrow.
Hide or disable the dates that are not pick-able (for example greater than max date) in drop-down calendar.
To reproduce: radDateTimePicker1.MinDate = new DateTime(2013, 9, 1); radDateTimePicker1.MaxDate = new DateTime(2013, 9, 15); radDateTimePicker1.NullDate = new DateTime(2013, 9, 1); radDateTimePicker1.NullText = "text"; Start the app and set the year to "1111", then click some button to cause the date time picker to lose focus. At this point, print the control Text and Value. While the text is correct, the value shows with year "1111" and is not validated by the MinDate 2013/9/1 Workaround - work with null and NullableValue instead of NullDate and a specific date, or use the following class class MyRadDateTimePicker : RadDateTimePicker { public override DateTime Value { get { DateTime? date = this.DateTimePickerElement.Value; if (date.HasValue) { if (date < this.MinDate) { return this.MinDate; } if (date > this.MaxDate) { return this.MaxDate; } return date.Value; } return this.MinDate; } set { base.Value = value; } }
NullabeValue property is set to 1/1/0001 instead of NULL when user delete the date and date is equal to NullDate.
For example: users should be able to enter date like this 31/02/2013 and when control lost the focus the date should convert to 28/02/2013 Resolution: This behavior could be achieved with the new FreeFormDateTimeProvider. Whit this provider user is not restricted from any mask and could enter the date in desire format. This provider is integrated in RadMakedEditBox so it can be used in RadDateTimePicker and RadTimePicker. To change default provider of RadDateTimePicker you should change the mask type of embedded RadMaskEditBox into RadDateTimePicker. For Example: this.radDateTimePicker1.DateTimePickerElement.TextBoxElement.MaskType = MaskType.FreeFormDateTime;
Step to reproduce: 1. Create Windows Forms project with a form 2. Place RadDateTimePicker control on created form 3. Run application. It will display current date. 4. Click on dropdown arrow to open Calendar 5. Navigate to any month outside of the current date using navigation bar on top of the Calendar, but do NOT select any date 6. Close Calendar without selecting any date 7. Click on dropdown arrow to open Calendar again. Calendar will display current date, which is correct. 8. Now select any date in Calendar 9. Click on dropdown arrow to open Calendar again. 10. Navigate to any month outside of the selected date using navigation bar on top of the Calendar, but do NOT select any date 11. Close and reopen Calendar again. It will display month to which it was navigated in Step 10. Instead it suppose to display selected date
The RadDateTimeEditor does not obey MaxDate and MinDate property when the value is changed by keyboard input. Work around: public class MyRadDateTimeEditor : RadDateTimeEditor { public MyRadDateTimeEditor() { RadDateTimeEditorElement element = this.EditorElement as RadDateTimeEditorElement; element.CurrentBehavior.TextBoxElement.ValueChanged += this.OnValueChanged; } private void OnValueChanged(object sender, System.EventArgs e) { RadMaskedEditBoxElement maskBox = sender as RadMaskedEditBoxElement; RadDateTimeEditorElement element = this.EditorElement as RadDateTimeEditorElement; DateTime result; if (maskBox.Value != null && DateTime.TryParse(maskBox.Value.ToString(), out result) && DateTime.Compare(result, element.MaxDate) > 0) { this.Value = element.MaxDate; maskBox.Value = element.MaxDate; return; } } }