Answer the question
In order to leave comments, you need to log in
How to catch kartik-v/datepicker date delete event?
I think many people use this plugin
,
I need to catch the date deletion event (I use the widget as a filter in the index) here is the code
[
'attribute'=>'expirationDate',
'label'=>'Поставлен на учет до',
'filter' => DatePicker::widget([
'name' => 'EmployeeSearch[expirationDate]',
'value' => $redisString,
'pluginOptions' => [
'autoclose'=>true,
'format' => 'yyyy-mm-dd'
],
'pluginEvents'=>[
"clearDate" => "function(e) {
e.preventDefault;
console.log(e);
}",
]
]),
'value'=>function($model){
...
}
],
Answer the question
In order to leave comments, you need to log in
I think the widget has nothing to do with it, most likely you wrapped it in pjax or another script. Try the same on a blank page to exclude the environment.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question