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

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -