public function getJsConfig()
    {
        $config = [
            'dateFormat' => $this->getDateFormat(),
            'from'       => ['id' => $this->getJsId('date-range-picker', 'from')],
            'to'         => ['id' => $this->getJsId('date-range-picker', 'to')],
        ];

        $dateBounds = $this->indexManager->getIndicesDateBounds(
            \Smile\ElasticsuiteTracker\Api\EventIndexInterface::INDEX_IDENTIFIER,
            $this->reportContext->getStoreId()
        );
        if (!empty($dateBounds)) {
            list($minDate, $maxDate) = $dateBounds;
            $config['minDate'] = $this->formatDate($minDate, \IntlDateFormatter::SHORT, false, 'UTC');
            $config['maxDate'] = $this->formatDate($maxDate, \IntlDateFormatter::SHORT, false, 'UTC');
        }

        return $this->jsonSerializer->serialize($config);
    }
public function getJsConfig()
    {
        $config = [
            'dateFormat' => $this->getDateFormat(),
            'from'       => ['id' => $this->getJsId('date-range-picker', 'from')],
            'to'         => ['id' => $this->getJsId('date-range-picker', 'to')],
        ];

        $dateBounds = $this->indexManager->getIndicesDateBounds(
            \Smile\ElasticsuiteTracker\Api\EventIndexInterface::INDEX_IDENTIFIER,
            $this->reportContext->getStoreId()
        );
        if (!empty($dateBounds)) {
            list($minDate, $maxDate) = $dateBounds;
            $config['minDate'] = $this->formatDate($minDate, \IntlDateFormatter::SHORT, false, 'UTC');
            $config['maxDate'] = $this->formatDate($maxDate, \IntlDateFormatter::SHORT, false, 'UTC');
        }

        return $this->jsonSerializer->serialize($config);
    }
public function getJsConfig ( ) { $ config = [ 'dateFormat' => $ this -> getDateFormat ( ) , 'from' => [ 'id' => $ this -> getJsId ( 'date-range-picker' , 'from' ) ] , 'to' => [ 'id' => $ this -> getJsId ( 'date-range-picker' , 'to' ) ] , ] ; $ dateBounds = $ this -> indexManager -> getIndicesDateBounds ( \ Smile \ ElasticsuiteTracker \ Api \ EventIndexInterface :: INDEX_IDENTIFIER , $ this -> reportContext -> getStoreId ( ) ) ; if ( ! empty ( $ dateBounds ) ) { list ( $ minDate , $ maxDate ) = $ dateBounds ; $ config [ 'minDate' ] = $ this -> formatDate ( $ minDate , \ IntlDateFormatter :: SHORT , false , 'UTC' ) ; $ config [ 'maxDate' ] = $ this -> formatDate ( $ maxDate , \ IntlDateFormatter :: SHORT , false , 'UTC' ) ; } return $ this -> jsonSerializer -> serialize ( $ config ) ; }
Get JS config

@return bool|string
Get JS config