Calendar Validation

001.png


Hi,

I would like to validate the calendar date whether it's selected or not, when I click the button "APPLY". Kindly help me asap.


1 Reply 1 reply marked as answer

SS SaiGanesh Sakthivel Syncfusion Team September 20, 2021 11:33 AM UTC

 
Thank you for using syncfusion products. 
 
#Regarding calender date is selected or not 
We have checked the reported query from our end. Your requirement can be achieved with help of selectedDate property in SfCalendar. Please refer to the following code snippet for your reference. 
 
Code Snippet: 
private void Button_Clicked(object sender, System.EventArgs e) 
{ 
    if (calendar.SelectedDate != null) 
        App.Current.MainPage.DisplayAlert("", "date is selected", "OK"); 
    else 
        App.Current.MainPage.DisplayAlert("", "date is not selected", "OK"); 
} 
 
Please refer to the sample in the following locations for your reference. 
 
Please let us know if you have any concerns. 
 
Regards,
SaiGanesh Sakthivel
 


Marked as answer
Loader.
Up arrow icon