本文整理汇总了PHP中dosamigos\datepicker\DatePicker::classname方法的典型用法代码示例。如果您正苦于以下问题:PHP DatePicker::classname方法的具体用法?PHP DatePicker::classname怎么用?PHP DatePicker::classname使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类dosamigos\datepicker\DatePicker
的用法示例。
在下文中一共展示了DatePicker::classname方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
?>
<?php
echo $form->field($model, 'user_full_name')->textInput(['maxlength' => true]);
?>
<?php
echo $form->field($model, 'email')->widget(\yii\widgets\MaskedInput::className(), ['clientOptions' => ['alias' => 'email']]);
?>
<?php
echo $form->field($model, 'adult_gender')->dropDownList(common\models\Adult::getGenderItems());
?>
<?php
echo $form->field($model, 'adult_dob')->widget(dosamigos\datepicker\DatePicker::classname(), ['template' => '{addon}{input}', 'clientOptions' => ['autoclose' => true, 'format' => 'dd-M-yyyy']]);
?>
<?php
echo $form->field($model, 'how_hear_id')->dropDownList(common\models\HowHear::HowHearAboutUs());
?>
<h2> Your Address and Phone Number </h2>
<?php
echo $form->field($model, 'country')->textInput(['maxlength' => true]);
?>
<?php
echo $form->field($model, 'state')->textInput(['maxlength' => true]);
?>
示例2: DateTime
<?php
NavBar::begin();
$form = ActiveForm::begin(['method' => 'post', 'action' => ['/tour/index'], 'options' => ['class' => 'form-inline']]);
?>
<?php
echo $form->field($model, 'search_data', ['options' => ['class' => 'search-data form-group']])->widget(Select2::classname(), ['data' => $data, 'options' => ['placeholder' => 'Введите ключевые слова...'], 'pluginOptions' => ['allowClear' => true]]);
?>
<!-- /.search-data -->
<?php
$today = new DateTime();
?>
<?php
echo $form->field($model, 'date_begin')->widget(\dosamigos\datepicker\DatePicker::classname(), ['language' => 'ru', 'clientOptions' => ['format' => 'yyyy-mm-dd', 'autoclose' => true, 'startDate' => 'today', 'defaultViewDate' => 'today', 'value' => $today]]);
?>
<div class="form-group btn-search">
<?php
echo Html::submitButton('Вперед!', ['class' => 'btn btn-success']);
?>
</div>
<?php
ActiveForm::end();
NavBar::end();
?>
</div>
<div class="row">
<div class="col-sm-12">
<?php
$i = 1;