Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
145363 | Jun 19,2019 04:35 AM UTC | Jun 20,2019 07:17 AM UTC | WinForms | 3 |
![]() |
Tags: ScheduleControl |
Query |
Response |
How can I change the format of the date display header item in the scheduler week view to the format I want? No customization of date display header items in weekly view; |
We suspect that you are using Metro theme appearance for Schedule control. If yes means, you could implement the following code to achieve your reported scenario. Please refer the following code example and the sample.
C#
scheduleControl1.Appearance.VisualStyle = Syncfusion.Windows.Forms.GridVisualStyles.Metro;
this.scheduleControl1.ScheduleGridCreated += ScheduleControl1_ScheduleGridCreated;
this.scheduleControl1.Appearance.WeekMonthFullFormat = "yyyy-mm-dd";
private voidScheduleControl1_ScheduleGridCreated(object sender,ScheduleGridCreatedEventArgs e)
{
if (e.Schedule.ScheduleType ==ScheduleViewType.Week)
{
e.Grid = new ScheduleGrid(e.Schedule.Calendar, e.Schedule, e.InitialDate);
e.Schedule.Appearance.WeekMonthFullFormat ="yyyy-MM-dd";
e.Handled = true;
}
} |
We need an example that converts date format 'mm, yyyy' to 'yyyy-mm' in SchedulerControl calendar navigator; |
To change the date format for calendar navigator, you could the QueryCellInfo event. Please refer the following code example.
C#
this.scheduleControl1.Calendar.CalenderGrid.QueryCellInfo += CalenderGrid_QueryCellInfo;
private voidScheduleControl1_ScheduleGridCreated(object sender,ScheduleGridCreatedEventArgs e)
{
if (e.Schedule.ScheduleType ==ScheduleViewType.Week)
{
e.Grid = new ScheduleGrid(e.Schedule.Calendar, e.Schedule, e.InitialDate);
e.Schedule.Appearance.WeekMonthFullFormat ="yyyy-MM-dd";
e.Handled = true;
}
} |
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.
This page will automatically be redirected to the sign-in page in 10 seconds.