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. Image for the cookie policy date

Gantt ScheduleModes and Header Formats

Hi,
In the example provided in the installation (Gantt / Schedule Modes), if I want to change the

ganttObject.model.scheduleHeaderSettings.weekHeaderFormat = "dd-MM";

in a format different from "M/dd" the gantt renders with the default format.
If I set the WeekHeaderFormat in the MVC Helpers, it is renederd correctly.
It seems the only header format that doesn't work, only in the Month Schedule Mode.
There is a workaround?

    Thanks in advance

    Andrea Perazzolo

3 Replies

MK Mahalakshmi Karthikeyan Syncfusion Team October 29, 2015 11:28 AM UTC

Hi Andrea,

Thanks for contacting Syncfusion support.

We were not able to reproduce any issue while using WeekHearFormat in Month schedule. We can set any week format to the Gantt using this property. Please refer the following code example for details.

@(Html.EJ().Gantt("Gantt").

      //…

     .ScheduleHeaderSettings(sh => {  

            sh.ScheduleHeaderType(GanttScheduleHeaderType.Month).WeekHeaderFormat("dd-MM"); })

)

We have also prepared a sample based on this and you can find the sample under the following location.

Sample: http://www.syncfusion.com/downloads/support/directtrac/general/ze/WeekHeader-1632125683

Regards,

Mahalakshmi K.



AP Andrea Perazzolo October 29, 2015 12:31 PM UTC

Hi,
As I wrote, when the WeekHeaderFormat is set in the MVC Helpers, it is rendered correctly.
When I change that with javascript function like the sample "Schedulesr Modes"

function onChange(args) {
    var ganttObject = $("#initiationG").data("ejGantt");
    if (args.itemId == 0) {

        ganttObject.model.scheduleHeaderSettings.weekHeaderFormat = "MMM dd , yyyy";
        ganttObject.model.scheduleHeaderSettings.dayHeaderFormat = "ddd";
        ganttObject.model.scheduleHeaderSettings.scheduleHeaderType = ej.Gantt.ScheduleHeaderType.Week;
        ganttObject.reRenderChart(ej.Gantt.ScheduleHeaderType.Week);
 
    } else if (args.itemId == 1) {
        ganttObject.model.scheduleHeaderSettings.monthHeaderFormat = "MMM yyyy";
        ganttObject.model.scheduleHeaderSettings.weekHeaderFormat = "dd-MM";

        ganttObject.model.scheduleHeaderSettings.scheduleHeaderType = ej.Gantt.ScheduleHeaderType.Month;
        ganttObject.reRenderChart(ej.Gantt.ScheduleHeaderType.Month);
    } else if (args.itemId == 2) {

        ganttObject.model.scheduleHeaderSettings.yearHeaderFormat = "yyyy";

        ganttObject.model.scheduleHeaderSettings.scheduleHeaderType = ej.Gantt.ScheduleHeaderType.Year;

        ganttObject.reRenderChart(ej.Gantt.ScheduleHeaderType.Year);
    }
}

Like this, in the month view, the Week Header is rendered always in the format "M/dd".

We are using the 13.1.0.29 version, but I have tried even with the Local Sample provided with installation, and even in that application the behavior is the same.

    Thanks in advance.

   Andrea Perazzolo



DK Dinesh Kumar Nagarathinam Syncfusion Team October 30, 2015 09:15 AM UTC

Hi Andrea,

We regret for the inconvenience caused.

We were able to reproduce the issue while changing the header formats of month schedule mode dynamically, and we have confirmed this as bug and logged a report on this. Also we have created a support incident under your account to track the status of this issue.


Please log on to our support website to check for further updates.


https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents


Please let us know if you require further assistance on this.

Regards,

Dinesh kumar.N


Loader.
Live Chat Icon For mobile
Up arrow icon