New to Telerik UI for WPF? Start a free 30-day trial
Preventing Tooltip Display for Error Content in RadDateTimePicker
Updated on Jul 4, 2025
Environment
| Product | RadDateTimePicker for WPF |
| Version | 2025.2.521 |
Description
I want to prevent the tooltip of the RadDateTimePicker control from showing when its content is set to Error.
Solution
To achieve this behavior, subscribe to the ParseDateTimeValue event of the RadDateTimePicker control. Check the IsParsingSuccessful property of the event arguments, and if it is false, set the IsTooltipOpen property of the control to false. Use the Dispatcher.BeginInvoke method to delay this logic.
Follow these steps:
- Subscribe to the
ParseDateTimeValueevent of RadDateTimePicker. - Implement the logic to check
IsParsingSuccessfulin the event handler. - If
IsParsingSuccessfulis false, useDispatcher.BeginInvoketo setIsTooltipOpento false.
Example implementation:
csharp
private void RadDateTimePicker_ParseDateTimeValue(object sender, ParseDateTimeEventArgs args)
{
if (!args.IsParsingSuccessful)
{
Dispatcher.BeginInvoke(new Action(() =>
{
this.dateTimePicker.IsTooltipOpen = false;
}));
}
}
Attach the event handler to your RadDateTimePicker instance:
csharp
this.dateTimePicker.ParseDateTimeValue += RadDateTimePicker_ParseDateTimeValue;
This approach prevents the tooltip from displaying when parsing the input fails.