Hi Peter Waugh
Thanks for contacting Syncfusion support.
We have checked with your query. In SfSchedule, you can get the current date of Month view as string by using VisibleDates property of VisibleDatesChangedEventArgs in VisibleDatesChanged event. We have prepared a simple sample to get current date as string using VisibleDatesChanged event. Kindly refer the code snippet and sample below.
Code snippet:
|
schedule.VisibleDatesChanged += Schedule_VisibleDatesChanged;
…
private void Schedule_VisibleDatesChanged(object sender, VisibleDatesChangedEventArgs e)
{
var count = e.VisibleDates.Count();
var dateFormat = new SimpleDateFormat("MMMM dd yyyy");
var currentDate = e.VisibleDates.FirstOrDefault(calendar => IsCurrentDate(calendar));
if (currentDate == null || e.VisibleDates[count / 2].Time.Month != Calendar.Instance.Time.Month)
button.Text = "";
else
button.Text = dateFormat.Format(currentDate.Time);
} |
You can also refer our online User Guide Documentation by using the below link.
Regards
Vigneshkumar R