RadDateTimePicker
A RadDateInput control with an integrated RadCalendar control and an integrated RadTimeView control. This combines the features of RadDatePicker and RadTimePicker in a single control for selecting both a date and a time value.
<p>
You can find information on the server API of RadDateTimePicker at <a href="https://docs.telerik.com/devtools/aspnet-ajax/controls/datetimepicker/server-side-programming/raddatetimepicker-object"></a>.
</p>
Definition
Namespace:Telerik.Web.UI
Assembly:Telerik.Web.UI.dll
Syntax:
[EmbeddedSkin("DateTimePicker", typeof(RadDateTimePicker))]
[EmbeddedSkin("DateTimePicker", "Default", typeof(RadDateTimePicker))]
[ToolboxBitmap(typeof(RadDateTimePicker), "Toolbox.Icons.DateTimePicker.png")]
[TelerikToolboxCategory("Date/Color Picker")]
[ValidationProperty("ValidationDate")]
[ControlValueProperty("SelectedDate")]
[ClientScriptResource("Telerik.Web.UI.RadDateTimePicker", "Telerik.Web.UI.Calendar.RadDateTimePickerScript.js")]
[ClientScriptResource("Telerik.Web.UI.RadDateTimePicker", "Telerik.Web.UI.Calendar.RadTimeViewScripts.js")]
public class RadDateTimePicker : RadDatePicker, IComponent, IDisposable, IParserAccessor, IUrlResolutionService, IDataBindingsAccessor, IControlBuilderAccessor, IControlDesignerAccessor, IExpressionsAccessor, IAttributeAccessor, IScriptControl, IControlResolver, ISkinnableControl, IControl, INamingContainer, IPostBackEventHandler, IPostBackDataHandler
Inheritance: objectControlWebControlRadWebControlRadDatePickerRadDateTimePicker...
Derived Classes:
Implements:
Inherited Members
Constructors
public RadDateTimePicker()
Properties
Gets or sets a value indicating whether a postback to the server automatically occurs when the user interacts with the control.
[Browsable(false)]
public override bool AutoPostBack { get; set; }
The default value is false.
Overrides:
Setting this property to true will make RadDateTimePicker postback to the server on date selection through the Calendar and Time popups or the DateInput components.
Gets or sets a value indicating whether a postback to the server automatically occurs when the user changes the list selection.
[Browsable(true)]
[Bindable(true)]
[ClientControlProperty]
public virtual AutoPostBackControl AutoPostBackControl { get; set; }
The default value is None
Set this to Both, TimeView or Calendar if the server needs to capture the selection changed event.
This property is effective only for RadDateTimePicker; for RadTimePicker use the AutoPostBack property.
The CssClass property will now be used instead of the former Skin and will be modified in AddAttributesToRender()
protected override string CssClassFormatString { get; }
Overrides:
Gets or sets the culture used by RadDateTimePicker to format the date and time value.
public override CultureInfo Culture { get; set; }
A CultureInfo object that represents the current culture used. The default value is System.Threading.Thread.CurrentThread.CurrentUICulture.
Overrides:
Gets or sets the value, indicating whether to render the link to the embedded base stylesheet of the control or not.
public override bool EnableEmbeddedBaseStylesheet { get; set; }
Overrides:
If EnableEmbeddedBaseStylesheet is set to false you will have to register the needed control base CSS file by hand.
Gets or sets the value, indicating whether to render script references to the embedded scripts or not.
public override bool EnableEmbeddedScripts { get; set; }
Overrides:
If EnableEmbeddedScripts is set to false you will have to register the needed Scripts files by hand.
Gets or sets the value, indicating whether to render links to the embedded skins or not.
public override bool EnableEmbeddedSkins { get; set; }
Overrides:
If EnableEmbeddedSkins is set to false you will have to register the needed CSS files by hand.
Gets or sets the enable client side navigation with keyboard.
public override bool EnableKeyboardNavigation { get; set; }
The enable client side navigation with keyboard.
Overrides:
Gets or sets default path for the grid images when EnableEmbeddedSkins is set to false.
public override string ImagesPath { get; set; }
A string containing the path for the grid images. The default is string.Empty.
Overrides:
Gets or sets the value, indicating whether to register with the ScriptManager control on the page.
public override bool RegisterWithScriptManager { get; set; }
Overrides:
If RegisterWithScriptManager is set to false the control can be rendered on the page using Web Services or normal callback requests/page methods.
Gets or sets the reference to the timeview that will be used for picking time. This property allows you to configure several datetimepickers to use a single RadTimeView instance.
[Browsable(false)]
public RadTimeView SharedTimeView { get; set; }
The RadTimeView instance if set; otherwise null;
This property is not accessible from the VS.NET designer and you will have to set it from the code-behind. It should be used when the shared timeview instance is in another naming container or is created dynamically at runtime.
Gets or sets the ID of the timeview that will be used for picking time. This property allows you to configure several datetimepickers to use a single RadTimeView instance.
[TypeConverter("Telerik.Web.Design.TimeViewIdConverter")]
public virtual string SharedTimeViewID { get; set; }
The string ID of the RadTimeView if set; otherwise String.Empty.
RadDateTimePicker will look for the RadTimeView instance in a way similar to how ASP.NET validators work. It will not go beyond the current naming container which means that you will not be able to configure a timeview that is inside a control in another naming container. You can still share a timeview, but you will have to pass a direct object reference via the SharedTimeView property.
protected override bool ShouldRenderAdditionalControls { get; }
Overrides:
Gets or sets the skin name for the control user interface.
public override string Skin { get; set; }
A string containing the skin name for the control user interface. The default is string.Empty.
Overrides:
If this property is not set, the control will render using the skin named "Default". If EnableEmbeddedSkins is set to false, the control will not render skin.
Gets the TimePopupButton instance of the RadDateTimeView control.
[Browsable(true)]
[PersistenceMode(PersistenceMode.InnerProperty)]
public virtual TimePopupButton TimePopupButton { get; }
You can use the object to customize the popup button's appearance and behavior.
Gets the RadTimeView instance of the datetimepicker control.
[Browsable(true)]
[PersistenceMode(PersistenceMode.InnerProperty)]
public virtual RadTimeView TimeView { get; }
This property is used by the RadDateTimeInput's internals only. It is subject to change in the future versions. Please do not use.
[Browsable(false)]
public override string ValidationDate { get; }
Overrides:
Methods
protected override void AddAdditionalControlComponents(HtmlTextWriter writer)
Overrides:
protected override void AddControlComponents(HtmlTextWriter writer)
Overrides:
protected override void CreateTimeControls()
Overrides:
protected override void DescribeClientEvents(IScriptDescriptor descriptor)
Overrides:
protected override void DescribeClientProperties(IScriptDescriptor descriptor)
Overrides:
protected override void DescribeProperties(IScriptDescriptor descriptor)
Overrides:
protected override void RenderChildren(HtmlTextWriter writer)
Overrides:
protected override void SetDefaultSize()
Overrides:
Events
Occurs on the server when an item in the RadTimeView control is created.
public event RadDateTimePicker.TimeItemEventHandler ItemCreated
The ItemCreated event is raised when an item in the RadTimeView control is created, both during round-trips and at the time data is bound to the control.
The ItemCreated event is commonly used to control the content and appearance of a row in the RadTimeView control.
Occurs when an item is data bound to the RadTimeView control.
public event RadDateTimePicker.TimeItemEventHandler ItemDataBound
The ItemDataBound event is raised after an item is data bound to the RadTimeView control. This event provides you with the last opportunity to access the data item before it is displayed on the client. After this event is raised, the data item is no longer available.