jQuery UI Widgets › Forums › Editors › ScrollBar, Slider, BulletChart, RangeSelector › Refresh mash up the drawing
Tagged: content, display, div, from, getRange, jqxRangeSelector, range, range selector, refresh, to
This topic contains 6 replies, has 2 voices, and was last updated by JoopC 10 years, 3 months ago.
-
Author
-
Hello,
when I use :
$(‘#jqxbutton’).click(function () {
$(“#rangeSelector”).jqxRangeSelector(‘refresh’)
});
the slider drawing is not oké anymore. You can try it with your own example in jsfiddle.——
I have the range sliders inside a jqxWindow. When the window is NOT open anymore or in the background I get with range.from the first day of minimum and range.to the last day of the minimum.I have make a video of this Item: http://youtu.be/jQ650ZxtjLs
Hello JoopC,
Thank you for your feedback. The refresh issue will be fixed in the next version of jQWidgets.
Could you share the initialization code of the range selector (from the video) and the click event handler of the “Create The Chart” button?
Best Regards,
DimitarjQWidgets team
http://www.jqwidgets.com/hello Dimitar
here is the init code
var dD = new Date();
$( “#rangeSelectorDate” ).jqxRangeSelector({
theme: ‘ui-overcast’,
width: 640,
height: 20,
min: new Date( 2013, 0, 1 ),
max: new Date( dD.getFullYear(), dD.getMonth(), dD.getDate() ),
labelsOnTicks: false,
range: { from: new Date( dD.getFullYear(), dD.getMonth() – 1, dD.getDate(),0,0,0 ), to: new Date( dD.getFullYear(), dD.getMonth(), dD.getDate(),0,0,0 ) },
majorTicksInterval: “month”,
minorTicksInterval: “day”,
labelsFormat: ‘MM’,
markersFormat: ‘dd-MMM-yyyy’
} );The routine for the alert window:
function CreateTheChart()
{
// this was only for demonstration that the slider did not return the good date.
var sss = $( “#rangeSelectorDate” ).jqxRangeSelector( ‘getRange’ );
alert( sss.from )
alert(sss.to)
….. continue with other code.Nowhere else in the program will the routine called or change.
Hi JoopC,
This behaviour occurs because you call the getRange method while the jqxRangeSelector is not displayed (
display: none
). To call a widget’s method, it has to be rendered on the page.Best Regards,
DimitarjQWidgets team
http://www.jqwidgets.com/Hello Dimitar,
That is a strange behavior because the rangeSelector is on a jqxWindow next to the jqxGrid in the same html page where a call the method.
The jqxGrid is accessible all the time.
Also the setRange method mess up the display of the jqxRangeSelector too.But thank you so much for your efforts.
JoopHi Joop,
Note that the range selector widgets requires the following structure (as documented in the tutorial Getting Started):
<div id="jqxRangeSelector"> <div id="jqxRangeSelectorContent"> </div> </div>
If you omit the content div, there may be some unexpected behaviour. As for why the methods do not work correctly when the range selector’s display is none, it is because internally it needs to calculate offsets, which is not possible when the widget is not displayed.
Best Regards,
DimitarjQWidgets team
http://www.jqwidgets.com/Hello Dimitar,
I want to inform you that (with the update 3.3.0) the RangeSelector is working oké now. Thank you so much.
Joop. -
AuthorPosts
You must be logged in to reply to this topic.