calendar click event

What would be the click event on the calendar to get the selected dates?

Image_9052_1731537784342




1 Reply

MA Manikanda Akash Munisamy Syncfusion Team November 14, 2024 12:12 PM UTC

Hi Roberson Gazolli,

We have reviewed your scenario regarding retrieving selected dates on calendar click. This can be achieved by using `scheduleControl1.Calendar.CalendarGrid.CellClick` to retrieve `scheduleControl1.Calendar.SelectedDates`. We have prepared and attached a sample for your reference.

Code Snippet:

scheduleControl1.Calendar.CalenderGrid.CellClick += CalenderGrid_CellClick;
private void CalenderGrid_CellClick(object sender, Syncfusion.Windows.Forms.Grid.GridCellClickEventArgs e)
 {
     if (scheduleControl1.Calendar.SelectedDates.Count > 0)
     {
         for (int i = 0; i < scheduleControl1.Calendar.SelectedDates.Count; i++)
         {
             Console.WriteLine("date " + scheduleControl1.Calendar.SelectedDates[i].ToLongDateString());
         }
     }
 }

If we have misunderstood your request or if your requirements differ, please provide additional details to help us better understand the issue and provide an accurate solution.

Thank you for your cooperation.
Regards,
Manikanda Akash

Attachment: ScheduleControl_Demo_98815a68.zip

Loader.
Up arrow icon