Footer in WPF DatePicker (SfDatePicker)

Done and Cancel Buttons

The done and cancel buttons can be made visible or hidden using the following properties.

ShowDoneButton

The ShowDoneButton property is used to show or hide the done button. The default value is true.

The following code sample shows how to hide the done button:

  • xaml
  • <syncfusion:SfDatePicker VerticalAlignment="Center"
    
                                   HorizontalAlignment="Center"
    
                                   Width="200">
    
                <syncfusion:SfDatePicker.SelectorStyle>
    
                    <Style TargetType="syncfusion:SfDateSelector">
    
                        <Setter Property="ShowDoneButton" Value="False"/>
    
                    </Style>
    
                </syncfusion:SfDatePicker.SelectorStyle>  
    
            </syncfusion:SfDatePicker>

    Show done button

    ShowCancelButton

    The ShowCancelButton property is used to show or hide the cancel button. The default value is true.

    The following code sample shows how to hide the cancel button:

  • xaml
  • <syncfusion:SfDatePicker VerticalAlignment="Center"
    
                                   HorizontalAlignment="Center"
    
                                   Width="200">
    
                <syncfusion:SfDatePicker.SelectorStyle>
    
                    <Style TargetType="syncfusion:SfDateSelector">
    
    			<Setter Property="ShowCancelButton" Value="False"/>
    
                    </Style>
    
                </syncfusion:SfDatePicker.SelectorStyle>        
    			
    			</syncfusion:SfDatePicker>

    Show cancel button