We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Is there and event for month change on Schedule Control?

Thread ID:





79021 Jan 16,2009 03:23 PM UTC Dec 24,2018 06:29 AM UTC WinForms 6
Tags: ScheduleControl
Peter Titus
Asked On January 16, 2009 03:23 PM UTC

I am trying to capture when a user changes the month on the caption panel on the schedule control. Is there an event that captures that? I have been unable to find anything. Any help would be appreciated.


Rajadurai C [Syncfusion]
Replied On January 19, 2009 01:52 PM UTC

Hi Peter,

Thanks for your interest in Syncfusion products.

Apologies for the delay.

You can track the change in text in caption panel by handling the following event.

this.scheduleControl1.HeaderLabel.TextChanged += new EventHandler(HeaderLabel_TextChanged);

void HeaderLabel_TextChanged(object sender, EventArgs e)


Peter Titus
Replied On January 19, 2009 02:48 PM UTC

That worked to handle the text change. Now I am trying to pull the current date on the control. I am using ScheduleControl1.Calendar.DateValue, but that doesn't seem to be consistant with what the text is showing. Is there a better date to use? Or do I need to parse the header text? What happens now is that the text doesn't change on the first click on the left arrow, but the dateValue does. So if you click twice, the dateValue goes back two months but the text only goes back one. Any help is appreciated. Or if you want me to move this over to Direct-Trac, let me know. It seems like it might be getting bigger than a quick forum question.

Peter Titus
Replied On January 20, 2009 05:51 PM UTC

I figured out how to manually do this via the following code. Let me know if you had something better, but this seems to work.

Dim StartDate As New Date(Me.ScheduleControl1.Calendar.DateValue.Year, Me.ScheduleControl1.Calendar.DateValue.Month, 1)
Dim EndDate As Date = StartDate.AddMonths(1)

While StartDate < EndDate
StartDate = StartDate.AddDays(1)
End While

Jisha Joy [Syncfusion]
Replied On January 23, 2009 06:33 AM UTC

Hi Perter,

Thank you for your update. Thanks for sharing information with us.


Replied On December 23, 2018 06:53 PM UTC

can you show me in VB.Net?

Arulraj A [Syncfusion]
Replied On December 24, 2018 06:29 AM UTC

Hi Brainative, 

Thanks for using Syncfusion product. 

To get the event when navigating to next month, you could use the Calendar.DateValueChanged event. Please refer the following code example and the sample. 

AddHandler Me.scheduleControl1.Calendar.DateValueChanged, AddressOf Calendar_DateValueChanged 
Private Sub Calendar_DateValueChanged(ByVal sender As Object, ByVal e As EventArgs) 
    'To get the top left date in month calendar. 
    Dim startTime As DateTime = Me.scheduleControl1.Calendar.TopLeftDate 
    'To get all the dates of current selected month date. 
    Dim selectedDates = Me.scheduleControl1.Calendar.SelectedDates 
    'To get the schedule view 
    Dim type As ScheduleViewType = Me.scheduleControl1.ScheduleType 
End Sub 

Please let us know if you have any concerns. 

Arulraj A 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon