php - yii2 different betwwen date -
i want ask how calculate different between 2 date , different show in form
this form
<?= $form->field($model, 'start_date', ['labeloptions' => ['class' => 'control-label col-md-2']])->textinput(['id' => 'datepicker', 'style' => 'width: auto;']) ?> <?= $form->field($model, 'end_date', ['labeloptions' => ['class' => 'control-label col-md-2']])->textinput(['id' => 'datepicker2', 'style' => 'width: auto;']) ?> <?= $form->field($model, 'duration', ['labeloptions' => ['class' => 'control-label col-md-2']])->textinput() ?>
so want calculate start_date , end_date n automaticly show in duration can u me please?
Comments
Post a Comment