kartik DateRangePicker separate attribute

in my db i have

date_start and date_end

is use this code




echo $form->field($model, 'dates', [

        'addon'=>['prepend'=>['content'=>'<i class="glyphicon glyphicon-calendar"></i>']],

        'options'=>['class'=>'drp-container form-group']

    ])->widget(DateRangePicker::classname(), [

        'useWithAddon'=>true,

        'endAttribute' => 'date_end',

        //'startAttribute' => 'date_start',

        'pluginOptions'=>[

                    'minDate'=> date('Y-m-d'),

                    'locale'=>[

                            'format' => 'YYYY-MM-DD',

                            'separator' => ' to ',

                    ],

                    'autoApply' => true,

                    "linkedCalendars"=> false,

                    "showCustomRangeLabel"=> false,

            ]

    ])->label(false);



dates is extra field declared into model. (not need for me)

if i decomment ‘startAttribute’ => ‘date_start’,

all dates are NaN NaN NaN NaN NaN

if i comment startAttribute, plugin work

But in this way i have

in dates -> 2017-08-10 to 2017-08-01

and date_end is empty

i need separated date_start and date_end in Yii::$app->request->post()

date_start -> 2017-08-10

date_end -> 2017-08-01