ADD DATE PICKER IN ACTIVE FORM

 

use kartik\date\DatePicker;
use kartik\form\ActiveForm;
use kartik\builder\Form;

<?php $form = ActiveForm::begin(['type'=>ActiveForm::TYPE_VERTICAL]); ?>


<?php echo Form::widget([ 
'model'=>$model,
'form'=>$form,
'columns'=>5,
'attributes'=>[

'birthplace'=>[
'type' => Form::INPUT_WIDGET, 
'widgetClass' => \kartik\date\DatePicker::classname(),
'pluginOptions' => [
'autoclose'=>true,
'format' => 'yyyy-mm-dd',
]],]])?>

'btn btn-success']) ?>
<?php ActiveForm::end(); ?>

Post a Comment

0 Comments