ghusse / jQRangeSlider

A jquery UI range selection slider that supports dates
http://ghusse.github.com/jQRangeSlider/
GNU General Public License v3.0
671 stars 147 forks source link

Problem with dataRangeSlider on hidden/outside screen div #69

Closed Cyberek closed 11 years ago

Cyberek commented 11 years ago

Hi. I have found Your plugin very interesting, but it seems a little bit buggy. I'm trying to put a dateRangelider on a div, that is display:none or position: absolute; left: -9999px;

On display:none issue, I have not found any solution. One, proposed by You ( rangeSlider('resize) ) works great with rangeSlider but not with dataRangeSlider.

Problem with position absolute outside screen is even more strange. After positioning containing element on screen everyting seems to be ok, but when I click one of the handles, .ui-rangeSlider-label element right/left value gets strange minus big value. Also, when I move containing element back outside screen, .ui-rangeSlider-label elements comes back to theirs oryginal (correct) positions and stays on screeen. When I click/slide them, they dissapear.

And again, when I enable the containing element, they show correctly, after touch/click/slide they dissapear.

Any idea on fixing this problem? The strange problem is, that if containing element starts visible on screen, than showing/hidding doeasnt affect anything. But even when I'll move it outside screen on load event, problem comes back :/

If You need testing enviroment, showing the problem, I an provide one to You, just tell me so.

ghusse commented 11 years ago

Can you create a jsfiddle or a satic html page reproducing your issue?

Le 21 déc. 2012 à 12:30, Cyberek notifications@github.com a écrit :

Hi. I have found Your plugin very interesting, but it seems a little bit buggy. I'm trying to put a dateRangelider on a div, that is display:none or position: absolute; left: -9999px;

On display:none issue, I have not found any solution. One, proposed by You ( rangeSlider('resize) ) works great with rangeSlider but not with dataRangeSlider.

Problem with position absolute outside screen is even more strange. After positioning containing element on screen everyting seems to be ok, but when I click one of the handles, .ui-rangeSlider-label element right/left value gets strange minus big value. Also, when I move containing element back outside screen, .ui-rangeSlider-label elements comes back to theirs oryginal (correct) positions and stays on screeen. When I click/slide them, they dissapear.

And again, when I enable the containing element, they show correctly, after touch/click/slide they dissapear.

Any idea on fixing this problem? The strange problem is, that if containing element starts visible on screen, than showing/hidding doeasnt affect anything. But even when I'll move it outside screen on load event, problem comes back :/

If You need testing enviroment, showing the problem, I an provide one to You, just tell me so.

— Reply to this email directly or view it on GitHub.

Cyberek commented 11 years ago

Thanks for reply... Ill work something out and get back again.

Cyberek commented 11 years ago

Ok, please visit: http://adversum (dot) goldbachinteractive (dot) com (dot) pl/

Now, click on big red backgrounded button in header "pokaz formularz kontaktowy", the contact form will show, then click on callendar icon - another popup will show with - and there is wrongly working slider.

But whats strange... trying to recreate problem on jsfiddle didnt work... and there everything is ok: http://jsfiddle.net/Cyberek/UrqnR/4/

Could You give me any advice?

Ps... when You resize the window with final popup on screen, everything comes back to normal.

ghusse commented 11 years ago

Your problem comes from a typo

Uncomment line 159

 //$("#dateslider").dataRangeSlider('resize');

And replace dataRangeSlider by dateRangeSlider (it's not datA but datE)

Cyberek commented 11 years ago

Thanks alot for support :). That was really a stupid typo :/. Merry Christmass:)