src/widget/Daterange.php
public function registerAssets(){
        $view = $this->getView();
        AdminUiDatePickerAsset::register($view);
        
        $options = ArrayHelper::merge([
            'timePicker' => false,
            'timePickerIncrement' => 30,
            'separator' => ' - ',
            'format' => 'YYYY-MM-DD',
        ], $this->clientOptions);
        $options = Json::encode($options);
        
        $id = $this->options['id'];
        $js = "jQuery('#$id').daterangepicker(".$options.")";
        $view->registerJs($js);
    }
public function registerAssets(){
        $view = $this->getView();
        AdminUiDatePickerAsset::register($view);
        
        $options = ArrayHelper::merge([
            'timePicker' => false,
            'timePickerIncrement' => 30,
            'separator' => ' - ',
            'format' => 'YYYY-MM-DD',
        ], $this->clientOptions);
        $options = Json::encode($options);
        
        $id = $this->options['id'];
        $js = "jQuery('#$id').daterangepicker(".$options.")";
        $view->registerJs($js);
    }
Registers the needed assets