0 Replies Latest reply: Sep 25, 2017 7:05 AM by SIVA PRASAD NIDAMANURI RSS

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

    SIVA PRASAD NIDAMANURI
      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')];

        }