Setting End date

Ask for help related to our 2.x versions.
Post Reply
User avatar
glenh123
Posts: 101
Joined: Wed Jul 25, 2012 10:37 am

Setting End date

Post by glenh123 » Thu Jan 24, 2013 3:15 am

Hi

Could someone please explain the reasoning behind using

Code: Select all

   node.setEndDate(endDt);
results the gantt displaying one day less than specified? Eg. If i set the 12th Sep it will display the 11th Sep. If this is by design is able to be disabled?

Thanks

User avatar
mats
Core Developer
Core Developer
Posts: 14585
Joined: Sat Dec 19, 2009 11:41 pm
Location: Sweden
Contact:

Re: Setting End date

Post by mats » Thu Jan 24, 2013 8:40 am

In JS, dates are always exact. So when you think you're setting

Code: Select all

   node.setEndDate(new Date(2013, 1, 25));
It means

Code: Select all

   node.setEndDate(new Date(2013, 1, 25, 0, 0, 0));
= midnight, which we display as 'the whole previous day' (inclusive date).
Tired of debugging javascript errors in web applications? Try our new error logging service RootCause, or read more on the Sencha blog

@bryntum
Facebook
API documentation

User avatar
jandresampaio
Premium Member
Premium Member
Posts: 143
Joined: Tue May 02, 2017 3:34 pm

Re: Setting End date

Post by jandresampaio » Fri Nov 16, 2018 4:42 pm

Hi,

Since this is still working this way (inclusive dates), how can we make end date column, for instance, display the exact date day ? Using renderer function ? Is there any situation where the renderer does not work well?

Thank you.

User avatar
arcady
Core Developer
Core Developer
Posts: 2213
Joined: Wed Mar 20, 2013 6:57 am

Re: Setting End date

Post by arcady » Mon Nov 19, 2018 4:51 am

In the Gantt 6.x we have introduced a new config Gnt.panel.Gantt#disableDateAdjustments that does what you want.

What version of the gantt do you have?

Post Reply