Events

This article provides more detailed information about the events exposed by the RadDateTimePicker control. As it inherits from the Control class, it also inherits all of its public events. A full list of the inherited events can be found here. In addition, the RadDateTimePicker exposes a few useful events.

ParseDateTimeValue

The ParseDateTimeValue event is raised in the following cases:

  • When the control loses focus.

  • When you select a value from the drop-down pane.

  • When you type a character in the control's input box.

The ParseDateTimeEventHandler receives two arguments:

Whenever you set the IsParsingSuccessful's value to False, the ErrorTooltip will appear. The Result value will be displayed in the TooltipContent appearing while you type in text in the control's input box.

See an example of implementing custom parsing logic in your RadDateTimePicker control by using the ParseDateTimeValue event here.

SelectionChanged

The SelectionChanged event is raised in the following cases:

  • When the control loses focus.

  • When you select a value from the drop-down pane.

  • When you enter some text, which can be successfully parsed and hit the Enter key on your keyboard.

If the text you enter in the input box can be successfully parsed, the Preview Tooltip is shown. Hitting Enter in this case will set the RadDateTimePicker's SelectedValue property to the content visible in the tooltip. If the input cannot be parsed, the content set as the ErrorTooltipContent is displayed and the value is cleared upon pressing the Enter key.

The event handler receives two arguments:

  • The sender argument contains the RadDateTimePicker control.

  • A SelectionChangedEventArgs object.

DropDownClosed occurs each time the drop-down pane gets hidden. The event handler receives two arguments:

  • The sender argument contains the RadDateTimePicker control.

  • A RoutedEventArgs object.

DropDownOpened occurs each time the drop-down pane gets shown. The event handler receives two arguments:

  • The sender argument contains the RadDateTimePicker control.

  • A RoutedEventArgs object.

See Also

In this article