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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to set Gantt datepicker week start day

Thread ID:

Created:

Updated:

Platform:

Replies:

132990 Oct 3,2017 02:36 AM Oct 5,2017 08:37 AM JavaScript 3
loading
Tags: ejGantt
Michal Cywinski
Asked On October 3, 2017 02:36 AM

Hello,

How do I set start day of the week in datepicker in gantt while editing?

Right now I've got something like in the attachment (week starts at N which stands for Saturday). I want the week to be starting on monday. It's pretty straightforward on standard on ejDatePicker, but I don't see at official documentation any option to set start day in date picker embedded in Gantt.


Thank you,
Michal

Suriyaprasanth Ravikumar [Syncfusion]
Replied On October 4, 2017 05:17 AM

Hi Michal, 
 
In Gantt, we have a column property called “editParams” to customize the editing controls like date picker, numeric textbox, dropdownlist etc. Using this property, we can customize the date picker API in the load event. 
In DatePicker, we have an API’s called “startDay” which is used to set the start day of the week. 
Please refer the code snippet below. 
$("#GanttContainer").ejGantt({ 
                dataSource: weekData, 
                 //.. 
                load: function () { 
                    var column = this.getColumns(); 
                        column[2].editParams={} 
                        column[2].editParams.startDay = 1; 
                } 
            }); 
 
 
We have prepared a sample for your reference, please find the sample from the below link. 
 
And also we can specify the start day of the week in week timescale mode by setting the day count value to the “scheduleHeaderSettings.weekStartDay” property. 
This property was used to changes week start day in Gantt timescale and date picker controls. 
Please refer the code snippet below. 
$("#GanttContainer").ejGantt({ 
                dataSource: weekData, 
                 //.. 
                scheduleHeaderSettings: { 
                    scheduleHeaderType: ej.Gantt.ScheduleHeaderType.Week, 
                          weekStartDay: 2 
                }, 
            }); 
 
 
We have prepared a sample for your reference, please find the sample from the below link. 
 
Please let us know if you require any other assistance on this. 
 
Thanks, 
Suriyaprasanth R. 


Michal Cywinski
Replied On October 4, 2017 06:26 AM

Thank you very much, your solution works perfectly.


Suriyaprasanth Ravikumar [Syncfusion]
Replied On October 5, 2017 08:37 AM

Hi Michal, 
 
Thanks for the update.  
Please let us know if you need any other assistance.  
 
Regards,  
Suriyaprasanth R. 


CONFIRMATION

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.

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

;