Hello,
I’m new in Yii2. please help me how to binding Kartik datepicker with textInput. if i choose date then textinput get the date value??
thanks
Hello,
I’m new in Yii2. please help me how to binding Kartik datepicker with textInput. if i choose date then textinput get the date value??
thanks
Hi sugengr!
Not sure if I understood. I usually use to code datepicker like a widget inside a formfield. See:
<?php
use kartik\form\ActiveForm;
use kartik\form\ActiveField;
use kartik\date\DatePicker;
// ....
echo $form->field($model, 'rev_date')->widget(DatePicker::classname(), [
'class' => 'col-sm-3',
'language' => 'pt-BR',
'size' => 'sm',
'type' => 2,
// 'disabled' => true,
'options' => [
'placeholder' => 'Selecione uma data ...',
'style' => 'width: 130px'],
'pluginOptions' => [
'autoclose'=>true,
'format' => 'dd/mm/yyyy',
'todayHighlight' => true,
]
]) ?>
Hope it helps.
Salute!