Search code examples
xamarinxamarin.formssyncfusion

Cancelcommand is not working in sfdatepicker in xamarin forms


I want normal cancel functionality on cancel button click of sfdatepicker footer, I am trying to achieve it by binding command but it is not working. Could any one suggest me any solution for that ?


Solution

  • You can use code like below:

     <datePicker:SfDatePicker.FooterView> 
         <Grid> 
              <Button Text="Ok" 
                      x:Name="footerViewButton" 
                      Clicked="footerViewButton_Clicked"/> 
         </Grid> 
      </datePicker:SfDatePicker.FooterView> 
    

    Created in this way, and then create the corresponding method in the ViewModel to achieve logical operations.