<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;
use dosamigos\datepicker\DatePicker;


/* @var $this yii\web\View */
/* @var $model backend\models\Article */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="article-form">

    <?php $form = ActiveForm::begin(); ?>

    <?= $form->field($model, 'title')->textInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'content')->textarea(['rows' => 6]) ?>
<!--    --><?//= $form->field($model, 'post_date')->widget(
//        DatePicker::className(), [
//        // inline too, not bad
//        // modify template for custom rendering
//        'clientOptions' => [
//            'autoclose' => true,
//            'format' => 'yyyy-mm-dd'
//        ]
//    ]);?>
    <?= $form->field($model, 'post_date')->textInput(['maxlength' => true]) ?>
    <?= $form->field($model, 'article_photo')->fileInput() ?>

    <div class="form-group">
        <?= Html::submitButton(Yii::t('app', 'Save'), ['class' => 'btn btn-success']) ?>
    </div>

    <?php ActiveForm::end(); ?>

</div>
