The DatePicker control uses DateTime values for all date properties like Date, DefaultHighlightedDate, MinimumDate, MaximumDate, etc.
With .NET 6 a new DateOnly type was introduced. It would be great if the Date(Only)Picker would support it as well.
For now, I created a custom DateOnlyToDateTime Converter and use it to bind the DateOnly properties from the ViewModel. But native support would be great.
When setting IsEnabled to False, the DatePicker is still enabled and the dropdown/popup can be opened. Still the disabled style is applied as expected.
The issue occurs in all pickers
If you create an implicit style for DatePicker, for example, like this:
<Style TargetType="telerikInput:RadDatePicker"> <Setter Property="SpinnerFormat" Value ="yyy/MMM/dd"/> <Setter Property="DisplayStringFormat" Value ="yyyy/MMM/dd"/> <Setter Property="IsClearButtonVisible" Value ="True"/> <Setter Property="IsToggleButtonVisible" Value ="True"/> </Style>
an "object reference not set to an instance of an object" exception is raised.
As a temporary workaround, set the SpinnerFormat and DisplayStringFormat properties directly to the DatePicker instance.