Example #1
0
<?php

use yii\helpers\Url;
use yii\helpers\Html;
use kartik\field\FieldRange;
use kartik\widgets\ActiveForm;
$this->title = 'Think Idea Area';
$this->params['breadcrumbs'][] = ['label' => 'Ideas', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>

<?php 
$form = ActiveForm::begin(['id' => 'login-form-inline', 'type' => ActiveForm::TYPE_INLINE]);
echo FieldRange::widget(['form' => $form, 'model' => $searchModel, 'label' => 'Enter time range', 'attribute1' => 'ideastart', 'attribute2' => 'ideaend', 'type' => FieldRange::INPUT_DATETIME]);
ActiveForm::end();
?>


Example #2
0
                    </div>
                    <div class="col-sm-6">
                        <?php 
echo $form->field($model, 'status')->widget(Select2::classname(), ['language' => 'ru', 'data' => Message::getStatuses(), 'options' => ['placeholder' => ''], 'pluginOptions' => ['allowClear' => true]]);
?>
                    </div>
                </div>
                <div class="row">
                    <div class="col-sm-6">
                        <?php 
echo FieldRange::widget(['form' => $form, 'model' => $model, 'label' => 'Дата создания', 'separator' => 'от ... до', 'attribute1' => 'created_at_from', 'attribute2' => 'created_at_till', 'type' => FieldRange::INPUT_DATETIME]);
?>
                    </div>
                    <div class="col-sm-6">
                        <?php 
echo FieldRange::widget(['form' => $form, 'model' => $model, 'label' => 'Дата редактирования', 'separator' => 'от ... до', 'attribute1' => 'updated_at_from', 'attribute2' => 'updated_at_till', 'type' => FieldRange::INPUT_DATETIME]);
?>
                    </div>
                </div>
                <div class="row">
                    <div class="col-sm-6">
                        <?php 
echo $form->field($model, 'created_user_id')->widget(Select2::classname(), ['language' => 'ru', 'data' => User::getAll(), 'options' => ['placeholder' => ''], 'pluginOptions' => ['allowClear' => true]]);
?>
                    </div>
                    <div class="col-sm-6">
                        <?php 
echo $form->field($model, 'updated_user_id')->widget(Select2::classname(), ['language' => 'ru', 'data' => User::getAll(), 'options' => ['placeholder' => ''], 'pluginOptions' => ['allowClear' => true]]);
?>
                    </div>
                </div>
Example #3
0
        <div class="form-group kv-fieldset-inline">
            <?php 
    echo Html::activeLabel($model, 'delivery_starts', ['label' => 'Početak izvršenja usluge', 'class' => 'col-sm-3 control-label']);
    ?>
            <div class="col-sm-5">
                <?php 
    echo $form->field($model, 'delivery_starts', ['showLabels' => false, 'feedbackIcon' => ['success' => 'ok', 'error' => 'exclamation-sign', 'successOptions' => ['class' => 'text-primary'], 'errorOptions' => ['class' => 'text-primary', 'style' => 'top: 6px;']]])->widget(DateControl::classname(), ['language' => 'rs-latin', 'type' => 'datetime', 'options' => ['type' => 2, 'size' => 'lg', 'pickerButton' => ['title' => 'Izaberite datum i vreme'], 'pluginOptions' => ['autoclose' => true, 'todayHighlight' => true, 'startDate' => date('Y-m-d H:i:s')]]]);
    ?>
            </div>
        </div>
    <?php 
} elseif ($service->time == 3) {
    // start + end
    ?>
                 <?php 
    echo FieldRange::widget(['form' => $form, 'model' => $model, 'label' => 'Početak izvršenja usluge', 'attribute1' => 'delivery_starts', 'attribute2' => 'delivery_ends', 'type' => FieldRange::INPUT_WIDGET, 'widgetClass' => DateControl::classname(), 'widgetOptions1' => ['language' => 'rs-latin', 'options' => ['type' => 2, 'size' => 'lg', 'pluginOptions' => ['autoclose' => true, 'todayHighlight' => true, 'startDate' => '0d']]], 'widgetOptions2' => ['language' => 'rs-latin', 'options' => ['type' => 2, 'size' => 'lg', 'pluginOptions' => ['autoclose' => true, 'todayHighlight' => true, 'startDate' => '0d']]]]);
    ?>
  
    <?php 
} else {
    // time optional
    ?>
        <div class="form-group">
            <div class="col-md-offset-3 col-md-9" style="">
                <?php 
    echo $form->field($model, 'new_time')->radioButtonGroup($data)->label(false);
    ?>
                
            </div>
        </div>
        <div class="form-group enter_time fadeIn animated" style="margin-top:30px; display:none;">            
Example #4
0
<?php

use yii\helpers\Html;
use kartik\widgets\ActiveField;
use kartik\widgets\TouchSpin;
use kartik\field\FieldRange;
use yii\helpers\ArrayHelper;
?>
	<?php 
echo FieldRange::widget(['form' => $form, 'model' => $model_spec, 'label' => $property->label, 'attribute1' => '[' . $index . ']value', 'attribute2' => '[' . $index . ']value_max', 'type' => FieldRange::INPUT_SPIN, 'separator' => '&larr; ' . \Yii::t('app', 'do') . ' &rarr;', 'widgetOptions1' => ['options' => ['style' => 'width:70px;', 'placeholder' => 'Od ...'], 'pluginOptions' => ['initval' => $specification->default_value, 'min' => $specification->range_min, 'max' => $specification->range_max, 'step' => $specification->range_step]], 'widgetOptions2' => ['options' => ['style' => 'width:70px;', 'placeholder' => '... do'], 'pluginOptions' => ['initval' => $specification->default_value, 'min' => $specification->range_min, 'max' => $specification->range_max, 'step' => $specification->range_step]]]);
<?php

/**
 * Created by PhpStorm.
 * User: David Cocom
 * Date: 21/02/2016
 * Time: 10:51 PM
 */
use app\models\Registration;
use kartik\field\FieldRange;
use kartik\widgets\ActiveForm;
use yii\bootstrap\Modal;
use yii\helpers\Html;
use yii\helpers\Url;
Modal::begin(['id' => 'modalChooseDate', 'header' => '<h2>Selecciona las fechas para la realización de tu servicio social</h2>']);
$model = new Registration();
$form = ActiveForm::begin(['action' => Url::to(['/student/default/set-beginning-and-ending-dates'])]);
?>


    <div class="input-group drp-container">

        <?php 
echo FieldRange::widget(['form' => $form, 'model' => $model, 'label' => 'Ingrese rango de fechas', 'separator' => ' al ', 'attribute1' => 'beginning_date', 'attribute2' => 'ending_date', 'type' => FieldRange::INPUT_DATE, 'widgetOptions1' => ['pluginOptions' => ['daysOfWeekDisabled' => [0, 6], 'autoclose' => true, 'format' => 'yyyy-m-d']], 'widgetOptions2' => ['pluginOptions' => ['autoclose' => true, 'format' => 'yyyy-m-d']]]);
?>
    </div>
    <br>
<?php 
echo Html::submitButton('Establecer fechas', ['class' => 'btn btn-success']);
ActiveForm::end();
Modal::end();