Hello Telerik Team,
I know there is a command, ClearCommand from the RadPickerBase, which could be used in order to clear out the picker's value. But I need to be able to clear the picker value from inside the selector Popup. Can you help me with this?
This is my datePicker declaration:
<
telerik:RadDateTimePicker
SelectedDate
=
"{Binding Value}"
>
<
telerik:RadDateTimePicker.SelectorSettings
>
<
telerik:PickerPopupSelectorSettings
FooterTemplate
=
"{StaticResource PickerFooterTemplate}"
/>
</
telerik:RadDateTimePicker.SelectorSettings
>
</
telerik:RadDateTimePicker
>
And this is an attempt to get the Clear command from the datePicker:
01.
<
ControlTemplate
x:Key
=
"PickerFooterTemplate"
>
02.
<
StackLayout
Orientation
=
"Horizontal"
03.
Spacing
=
"0"
04.
HorizontalOptions
=
"FillAndExpand"
05.
BackgroundColor
=
"{StaticResource SecondaryButtonColor}"
>
06.
<
Button
Text
=
"Clear"
07.
TextColor
=
"{StaticResource TextColor}"
08.
BackgroundColor
=
"Transparent"
09.
-->
Command
=
"{Binding Source={RelativeSource FindAncestor, AncestorType={x:Type telerik:RadDateTimePicker}, AncestorLevel=1}, Path=ClearCommand}"
/>
10.
<
Button
Text
=
"{TemplateBinding AcceptButtonText}"
11.
TextColor
=
"{StaticResource TextColor}"
12.
BackgroundColor
=
"Transparent"
13.
Command
=
"{TemplateBinding AcceptCommand}"
/>
14.
<
Button
Text
=
"{TemplateBinding CancelButtonText}"
15.
TextColor
=
"{StaticResource TextColor}"
16.
BackgroundColor
=
"Transparent"
17.
Command
=
"{TemplateBinding CancelCommand}"
/>
18.
</
StackLayout
>
19.
</
ControlTemplate
>