protected function getDefaultJsOptions()
    {
        $carbon = new Carbon();
        $prev_month = Carbon::now()->startOfMonth()->subWeek();
        $today = Carbon::now();
        $res = [
            'format' => 'YYYY-MM-DD',
            'ranges' => [
                'previous_month' => [
                    'Previous month (' . $prev_month->format('F') . ')',
                    [
                        $prev_month->startOfMonth()->format('Y-m-d'),
                        $prev_month->endOfMonth()->format('Y-m-d'),
                    ]
                ],
                'current_month' => [
                    'Cur. month (' . date('F'). ')',
                    [
                        $carbon->startOfMonth()->format('Y-m-d'),
                        $carbon->endOfMonth()->format('Y-m-d')
                    ]
                ],
                'last_week' => [
                    'This Week',
                    [
                        $carbon->startOfWeek()->format('Y-m-d'),
                        $carbon->endOfWeek()->format('Y-m-d')
                    ]
                ],
                'last_14' => [
                    'Last 14 days',
                    [
                        Carbon::now()->subDays(13)->format('Y-m-d'),
                        $today->format('Y-m-d')
                    ]
                ],

            ],
        ];
        // will not set dates when '' passed but set default date when null passed
        if ($this->getStartValue()) {
            $res['startDate'] = $this->getStartValue();
        }
        if ($this->getEndValue()) {
            $res['endDate'] = $this->getEndValue();
        }
        return $res;
    }
protected function getDefaultJsOptions()
    {
        $carbon = new Carbon();
        $prev_month = Carbon::now()->startOfMonth()->subWeek();
        $today = Carbon::now();
        $res = [
            'format' => 'YYYY-MM-DD',
            'ranges' => [
                'previous_month' => [
                    'Previous month (' . $prev_month->format('F') . ')',
                    [
                        $prev_month->startOfMonth()->format('Y-m-d'),
                        $prev_month->endOfMonth()->format('Y-m-d'),
                    ]
                ],
                'current_month' => [
                    'Cur. month (' . date('F'). ')',
                    [
                        $carbon->startOfMonth()->format('Y-m-d'),
                        $carbon->endOfMonth()->format('Y-m-d')
                    ]
                ],
                'last_week' => [
                    'This Week',
                    [
                        $carbon->startOfWeek()->format('Y-m-d'),
                        $carbon->endOfWeek()->format('Y-m-d')
                    ]
                ],
                'last_14' => [
                    'Last 14 days',
                    [
                        Carbon::now()->subDays(13)->format('Y-m-d'),
                        $today->format('Y-m-d')
                    ]
                ],

            ],
        ];
        // will not set dates when '' passed but set default date when null passed
        if ($this->getStartValue()) {
            $res['startDate'] = $this->getStartValue();
        }
        if ($this->getEndValue()) {
            $res['endDate'] = $this->getEndValue();
        }
        return $res;
    }
protected function getDefaultJsOptions ( ) { $ carbon = new Carbon ( ) ; $ prev_month = Carbon :: now ( ) -> startOfMonth ( ) -> subWeek ( ) ; $ today = Carbon :: now ( ) ; $ res = [ 'format' => 'YYYY-MM-DD' , 'ranges' => [ 'previous_month' => [ 'Previous month (' . $ prev_month -> format ( 'F' ) . ')' , [ $ prev_month -> startOfMonth ( ) -> format ( 'Y-m-d' ) , $ prev_month -> endOfMonth ( ) -> format ( 'Y-m-d' ) , ] ] , 'current_month' => [ 'Cur. month (' . date ( 'F' ) . ')' , [ $ carbon -> startOfMonth ( ) -> format ( 'Y-m-d' ) , $ carbon -> endOfMonth ( ) -> format ( 'Y-m-d' ) ] ] , 'last_week' => [ 'This Week' , [ $ carbon -> startOfWeek ( ) -> format ( 'Y-m-d' ) , $ carbon -> endOfWeek ( ) -> format ( 'Y-m-d' ) ] ] , 'last_14' => [ 'Last 14 days' , [ Carbon :: now ( ) -> subDays ( 13 ) -> format ( 'Y-m-d' ) , $ today -> format ( 'Y-m-d' ) ] ] , ] , ] ; // will not set dates when '' passed but set default date when null passed if ( $ this -> getStartValue ( ) ) { $ res [ 'startDate' ] = $ this -> getStartValue ( ) ; } if ( $ this -> getEndValue ( ) ) { $ res [ 'endDate' ] = $ this -> getEndValue ( ) ; } return $ res ; }
Returns default javascript options

Available options:
@see https://github.com/dangrossman/bootstrap-daterangepicker#options

@return array
Returns default javascript options