0 Replies Latest reply: Feb 6, 2018 11:31 AM by John Morgan RSS

    Date range in QlikSense Server 3.2

    John Morgan

      I have a sheet in QlikSense Server 3.2 that I need to be able to filter by date range.  I've tried all of the daterange pickers I can find in Branch and they all seem to have issues, from not being able to be imported to just displaying the angular js default welcome message.

       

      I started looking at DateRangePicker (GitHub - panchaldixit/Qliksense-DateRangePicker) in the dev hub and can get it to work but only with some unexpected modification.  If I add an alert after what I believe is looking for the expanded window to close (the while loop) then the following if statement resolves as true and the update and backend calls run properly.  Otherwise it always evaluates to false, so the calendar display closes and nothing happens.  The code snippet in question is:

       

         while (layout.qListObject.qDataPages.length) {
      layout.qListObject.qDataPages.pop();
        }
         if (layout.qListObject.qDimensionInfo.qStateCounts.qSelected > 0) {

       

      So the questions I have are,

      1. Can anyone point me to a date range picker that will working in QlikSense 3.2?
      2. If no, can anyone explain the layout object above?  I am not entirely sure I am correct on what the while is doing.
      3. Can anyone explain why putting a javascript alert between the while and the if would cause the if to evaluate correctly (this feels like an async timing issue to me which makes me think I should be able to register a promise instead of waiting for the while)?

       

      Thanks!