Date range slider problem

On a screen I am developing I have two daterange sliders. The first slider is working properly.

What I want to be able to do is have the selected start and end daterange from the first daterange slider to populate the outrangestartdate and outrangestopdate fields of the second daterange slider.

here is the code I am using in the property change event of the first daterange slider.

event.source.parent.getComponent('Historical Gantt').outerRangeStartDate=event.source.startDate event.source.parent.getComponent('Historical Gantt').ot1=event.source.startDate print event.source.startDate print event.source.parent.getComponent('Historical Gantt').outerRangeStartDate event.source.parent.getComponent('Historical Gantt').outerRangeEndDate=event.source.endDate event.source.parent.getComponent('Historical Gantt').ot2=event.source.endDate print event.source.endDate print event.source.parent.getComponent('Historical Gantt').outerRangeEndDate

I put the prints in place to see what data was being passed over. Then I added into the second daterange slider two dynamic properties that were set to date just to see if things were comming over. The two dynamic properties OT1 and OT2 are being set properly from the first daterange slider. And the outerRangeEndDate of the second slider is getting set properly. However the outerRangeStartDate is not being set properly, it seems to take the 59min and 59seconds off of the outerRangeEndDate and that is what is populated in the outerRangeStartDate.

Example:
Slider1 set for start of 8/12/2009 0:00:00 and an end of 8/22/2009 11:59:59 – When this date information is passed over to the OT1 and OT2 dynamic properties it is correct. And when you look at the outerRangeEndDate that is also correct. But the data it populated in the outerRangeStartDate is 8/22/2009 11:00:00.

I have deleted the daterange component and put a new one there thinking I might have changed something. Still get the same results. Copy and pasted the working component, still get the same results.

I am currently running 3.3.1

Hmm, it looks like this is because your outer end date is before the second range’s current start date. I think this might be a minor bug - it should probably be checking if the outer end date is before the outer start date, not the selected start date. In any case, you can work around this by making sure you set the properties in the following order, and making sure that

Outer Start < Start < End < Outer End

Maybe I am missing something here because I dont fully understand. If you look at my OP you can see that I have the start being set first, then I set my end. And in the script I have it printing so I can see what is going across in the console. So i know that the slider1.start is smaller than slider1.end. I also know that slider2.outerstart is set to slider1.start and the same is done with the end.

Are you saying the the slider2.outerstart should be smaller than slider1.start?

[quote=“Carl.Gould”]Hmm, it looks like this is because your outer end date is before the second range’s current start date. I think this might be a minor bug - it should probably be checking if the outer end date is before the outer start date, not the selected start date. In any case, you can work around this by making sure you set the properties in the following order, and making sure that

Outer Start < Start < End < Outer End[/quote]

No, I’m saying that you’re only setting the 2nd range’s outer dates. You need to set the inner dates too so they’re within the new outer dates.