To enable the non-restrictive mode of RadMaskedEditBox, the MaskType should be set to FreeFormDateTime:
radMaskedEditBox1.MaskType = MaskType.FreeFormDateTime;
RadMaskedEditBox1.MaskType = MaskType.FreeFormDateTime
To enable the free form date time parsing in RadDateTimePicker, one needs to set the MaskType of the inner masked edit box:
.radDateTimePicker1.DateTimePickerElement.TextBoxElement.MaskType = MaskType.FreeFormDateTime;
.radDateTimePicker1.DateTimePickerElement.TextBoxElement.MaskType = MaskType.FreeFormDateTime
Enabling the free form of RadTimePicker uses the same approach as above:
radTimePicker1.TimePickerElement.MaskedEditBox.MaskType = MaskType.FreeFormDateTime;
radTimePicker1.TimePickerElement.MaskedEditBox.MaskType = MaskType.FreeFormDateTime
Of course, all parse operations are validated according to the control’s minimum and maximum range.
.radCalendar1.HeaderNavigationMode = HeaderNavigationMode.Zoom;
.RadCalendar1.HeaderNavigationMode = HeaderNavigationMode.Zoom
.radCalendar1.ZoomLevel = ZoomLevel.Months;
.RadCalendar1.ZoomLevel = ZoomLevel.Months
sender, CalendarZoomChangingEventArgs e)
(radCalendar1.ZoomLevel == ZoomLevel.Months)
radCalendar1.ZoomLevel = ZoomLevel.Months
As always, the ___ing event has its ___ed counterpart – ZoomChanged that informs you when the zoom level has been changed.
Another highly demanded feature is for the end user to be able to pick both date and time in RadDateTimePicker. With the latest bits, this is now possible. Enabling time picker in RadDateTimePicker is as easy as setting the following property:
In addition, you might want to customize the format the date in the control is displayed in order to accommodate time as well:
.radDateTimePicker1.Format = DateTimePickerFormat.Custom;
"MMM - dd - yyyy hh:mm tt"
.radDateTimePicker1.Format = DateTimePickerFormat.Custom
DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 8, 0, 0);
DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 17, 0, 0);
DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 8, 0, 0)
DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 17, 0, 0)
This is it, folks. With all these new features at hand, entering date will feel like a breeze to the end-users.Happy coding!
Stefan Stefanov (MCPD) is a Product Manager at Progress. He has been working with Telerik products since 2010, when he joined the company. Off work he enjoys traveling, hanging out with friends and reading various technology blogs. You can find Stefan on Twitter and LinkedIn.
Subscribe to be the first to get our expert-written articles and tutorials for developers!