Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Guy's how to pass the year value in dynamically when i am select the input date from calendar....

var lkl=$('input[name="daterange"]').daterangepicker();

   if (layout.props.CustomRangesEnabled) {

  config.locale.customRangeLabel = layout.props.customRangeLabel;

  config.ranges = rangesLiteral;

   //rangesLiteral[layout.props.today] = [moment(), moment()];

   //rangesLiteral[layout.props.yesterday] = [moment().subtract(1, 'days'), moment().subtract(1, 'days')];

  rangesLiteral[layout.props.lastXDays.replace("$", "1")] = [moment().subtract(6, 'days'), moment()];

                    rangesLiteral[layout.props.lastXWeeks.replace("$", "2")] = [moment().subtract(13, 'days'), moment()];

   //rangesLiteral[layout.props.lastXDays.replace("$", "30")] = [moment().subtract(29, 'days'), moment()];

             

  rangesLiteral[layout.props.thisMonth] = [moment().startOf('month'), moment().endOf('month')];

  rangesLiteral[layout.props.lastMonth] = [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')];

                    rangesLiteral[layout.props.thisYear] = [moment().startOf('year'), moment().endOf('year')];

  }

0 Replies