本文整理汇总了PHP中kartik\datetime\DateTimePicker::classname方法的典型用法代码示例。如果您正苦于以下问题:PHP DateTimePicker::classname方法的具体用法?PHP DateTimePicker::classname怎么用?PHP DateTimePicker::classname使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类kartik\datetime\DateTimePicker
的用法示例。
在下文中一共展示了DateTimePicker::classname方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: isset
<?php
$title = isset($model->name) && !empty($model->name) ? $model->name : 'Advertise';
echo Html::img($model->getImageUrl(), ['class' => 'img-thumbnail center-block', 'alt' => $title, 'title' => $title]);
?>
<?php
echo $form->field($model, 'img')->widget(FileInput::classname(), ['name' => 'image-member', 'pluginOptions' => ['showCaption' => false, 'showRemove' => false, 'showUpload' => false, 'browseClass' => 'btn btn-primary btn-block', 'browseIcon' => '<i class="glyphicon glyphicon-camera"></i> ', 'browseLabel' => yii::t('advertise', 'Select Photo')], 'options' => ['accept' => 'image/*']]);
?>
<?php
echo $form->field($model, 'name')->textInput(['maxlength' => true]);
?>
<?php
echo $form->field($model, 'start_at')->widget(DateTimePicker::classname(), ['type' => DateTimePicker::TYPE_COMPONENT_PREPEND, 'options' => ['placeholder' => 'Enter event time ...'], 'value' => '23-Feb-1982 01:10', 'layout' => '{picker}{input}', 'pluginOptions' => ['autoclose' => true, 'todayHighlight' => true, 'todayBtn' => true, 'format' => 'mm/dd/yyyy hh:ii:ss']]);
?>
<?php
echo $form->field($model, 'end_at')->widget(DateTimePicker::classname(), ['options' => ['placeholder' => 'Enter event time ...'], 'layout' => '{picker}{input}', 'pluginOptions' => ['autoclose' => true, 'todayHighlight' => true, 'todayBtn' => true, 'format' => 'mm/dd/yyyy hh:ii:ss']]);
?>
<?php
echo $form->field($model, 'is_show')->widget(CheckboxX::classname(), ['autoLabel' => false, 'pluginOptions' => ['threeState' => false, 'size' => 'md']])->label("Is Show");
?>
<?php
echo $form->field($model, 'link')->textInput(['maxlength' => true]);
?>
<?php
echo $form->field($model, 'body')->widget(CKEditor::className(), ['options' => ['rows' => 6], 'preset' => 'advanced']);
?>
<?php
$langues = BLanguecenter::find()->where(['is_show' => 1])->orderBy('ordinal_view ASC')->all();
$id = '';
示例2:
echo $form->field($model, 'title')->textInput(['maxlength' => true]);
?>
<?php
//echo $form->field($model, 'intro')->textarea(['rows' => 6])
?>
<?php
echo $form->field($model, 'url')->textInput(['maxlength' => true]);
?>
<?php
echo $form->field($model, 'start_time')->widget(DateTimePicker::classname(), ['options' => ['placeholder' => '开始时间'], 'pluginOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd hh:ii']]);
?>
<?php
echo $form->field($model, 'end_time')->widget(DateTimePicker::classname(), ['options' => ['placeholder' => '到期时间'], 'pluginOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd hh:ii']]);
?>
<?php
echo $form->field($model, 'status')->dropDownList(['1' => '启用', '0' => '禁用']);
?>
<div class="form-group">
<?php
echo Html::submitButton($model->isNewRecord ? '添加' : '修改', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
</div>
<?php
ActiveForm::end();
?>
示例3:
<?php
echo $form->field($model, 'title')->textInput(['maxlength' => true]);
?>
<?php
echo $form->field($model, 'description')->textarea();
?>
<?php
echo $form->field($model, 'start')->widget(\kartik\datetime\DateTimePicker::classname(), ['options' => ['placeholder' => '请设置事件的起始时间...'], 'pluginOptions' => ['autoclose' => true]]);
?>
<?php
echo $form->field($model, 'end')->widget(\kartik\datetime\DateTimePicker::classname(), ['options' => ['placeholder' => '请设置事件的起始时间...'], 'pluginOptions' => ['autoclose' => true]]);
?>
<?php
echo $form->field($model, 'dow')->textInput(['maxlength' => true]);
?>
<?php
echo $form->field($model, 'url')->textInput(['maxlength' => true]);
?>
<?php
echo $form->field($model, 'className')->textInput(['maxlength' => true]);
?>
示例4:
<?php
$form = ActiveForm::begin();
?>
<?php
echo $form->field($shift, 'title')->textInput(['maxlength' => 255]);
?>
<div class="form-group">
<?php
echo $form->field($shift, 'length')->textInput();
?>
<p class="help-block">In Hours</p>
</div>
<?php
echo $form->field($shift, 'formStart')->widget(DateTimePicker::classname(), ['pluginOptions' => ['defaultTime' => false, 'format' => 'M d yyyy, H:ii P', 'startDate' => $model->event->formStart, 'endDate' => $model->event->formEnd]]);
?>
<?php
echo $form->field($shift, 'min_needed')->textInput();
?>
<?php
echo $form->field($shift, 'max_needed')->textInput();
?>
<?php
echo $form->field($shift, 'active')->checkbox();
?>
<?php
echo $form->field($shift, 'requirement_id')->dropDownList(ArrayHelper::map($requirements, 'id', 'name'), ['prompt' => 'N/A']);
示例5: array
echo $form->field($model, 'name')->textInput(['maxlength' => true]);
?>
<?php
echo '<label class="control-label">Add Items</label>';
echo Select2::widget(['name' => 'meal_id', 'value' => $selected, 'data' => $data, 'options' => ['placeholder' => 'Select an item ...', 'multiple' => true], 'pluginOptions' => ['tags' => true, 'maximumInputLength' => 10]]);
?>
<br />
<?php
// Normal select with ActiveForm & model
echo $form->field($model, 'day')->widget(Select2::classname(), ['data' => Yii::$app->params['lunchDays'], 'options' => ['placeholder' => 'Select a day of meal ...'], 'pluginOptions' => ['allowClear' => true]]);
?>
<?php
echo $form->field($model, 'deal_closing_time')->widget(DateTimePicker::classname(), ['options' => ['placeholder' => 'Enter deal closing time ...'], 'pluginOptions' => ['autoclose' => true, 'format' => 'mm/dd/yyyy hh:ii:ss']]);
?>
<?php
echo $form->field($model, 'meal_price')->textInput()->hint('')->label('Price');
?>
<?php
echo $form->field($productImages, 'image')->widget(FileInput::classname(), ['options' => ['multiple' => false, 'accept' => 'image/*'], 'pluginOptions' => ['previewFileType' => 'image', 'showUpload' => false]]);
?>
<!-- CHECKBOX BUTTON WITH LABEL OPTIONS, DISABLED AND STYLE PROPERTIES -->
<?php
echo $form->field($model, 'deal_status')->checkbox(array('label' => '', 'labelOptions' => array('style' => 'padding:5px;'), 'disabled' => false))->label('Active');
/*echo FileInput::widget([
'name' => 'imageFile[]',
示例6:
?>
<?php
echo $form->field($model, 'budzhet')->dropDownList(['1' => 'Относится', '0' => 'Не относится']);
?>
<?php
echo $form->field($model, 'date_zvit')->widget(DateTimePicker::classname(), ['options' => ['placeholder' => 'Выберите дату и время ...'], 'pluginOptions' => ['autoclose' => true, 'weekStart' => 1]]);
?>
<br>
<?php
echo $form->field($model, 'date_zvit_us')->widget(DateTimePicker::classname(), ['options' => ['placeholder' => 'Выберите дату и время ...'], 'pluginOptions' => ['autoclose' => true, 'weekStart' => 1]]);
?>
<br>
<?php
echo $form->field($model, 'key')->dropDownList(['0' => 'Не нужен', '1' => 'Нужен']);
?>
<?php
echo $form->field($model, 'zhurnal')->dropDownList(['1' => 'Внесено', '0' => 'Не Внесено']);
?>
<?php
echo $form->field($model, 'note')->textInput(['maxlength' => true]);
示例7:
</li>
<li><span>Stap 6</span><?php
echo Html::a(Yii::t('request-project', 'Overview'), ['/request-project/overview']);
?>
</li>
</ul>
<div class="col-sm-6">
<div class="row">
<div class="block">
<?php
$form = ActiveForm::begin();
?>
<?php
echo $form->field($model, 'deadline')->widget(\kartik\datetime\DateTimePicker::classname(), ['pluginOptions' => ['minView' => 'month', 'format' => 'dd-mm-yyyy', 'weekStart' => 1, 'daysOfWeekDisabled' => [0, 6], 'todayHighlight' => true, 'startDate' => '+7d']]);
?>
<?php
echo $form->field($model, 'comment')->textArea();
?>
<?php
echo Html::a(Yii::t('common', 'Last step'), ['step-2'], ['class' => 'btn btn-primary']);
?>
<?php
echo Html::submitButton(Yii::t('common', 'Next step'), ['class' => 'btn btn-primary']);
?>
<?php
ActiveForm::end();
示例8: ConnectionForm
<?php
Modal::begin(['id' => 'edit-modal', 'header' => 'Edit', 'footer' => '<button type="button" class="confirm-btn btn btn-primary">Confirm</button>' . '<button type="button" class="btn btn-default undo-btn">Undo changes</button>' . '<button type="button" class="btn btn-default close-btn">Close</button>']);
$form = ActiveForm::begin(['id' => 'edit-form', 'action' => ['connection/update'], 'enableAjaxValidation' => true]);
?>
<input name="ConnectionForm[id]" value="<?php
echo $conn->id;
?>
" hidden>
<?php
$editForm = new ConnectionForm();
echo $form->field($editForm, 'acceptRelease')->widget(SwitchInput::classname(), ['pluginOptions' => ['onText' => 'Yes', 'offText' => 'No']]);
echo $form->field($editForm, 'bandwidth')->widget(TouchSpin::classname(), ['pluginOptions' => ['postfix' => 'Mbps', 'verticalbuttons' => true, 'verticalupclass' => 'fa fa-plus', 'verticaldownclass' => 'fa fa-minus', 'min' => 10, 'max' => 1000000, 'step' => 10]]);
echo $form->field($editForm, 'start')->widget(DateTimePicker::classname(), ['pluginOptions' => ['autoclose' => true, 'format' => 'dd/mm/yyyy hh:ii']]);
echo $form->field($editForm, 'end')->widget(DateTimePicker::classname(), ['pluginOptions' => ['autoclose' => true, 'format' => 'dd/mm/yyyy hh:ii']]);
ActiveForm::end();
?>
<?php
Modal::end();
?>
<?php
Modal::begin(['id' => 'cancel-modal', 'header' => 'Cancel', 'footer' => '<button type="button" class="btn btn-danger confirm-btn">Confirm</button>' . '<button type="button" class="btn btn-default close-btn">Close</button>']);
?>
Do you want cancel this circuit?
<?php
Modal::end();
示例9:
if ($(\'#contactmoment-customer_id\').val()) {
existingContact();
}
}
', View::POS_HEAD);
$this->registerJs('$("document").ready(checkIfUpdating());');
?>
<div class="contact-moment-form block">
<?php
$form = ActiveForm::begin();
?>
<?php
echo $form->field($model, 'moment')->widget(\kartik\datetime\DateTimePicker::classname(), ['pluginOptions' => ['format' => 'yyyy-mm-dd h:ii:00']]);
?>
<?php
echo $form->field($model, 'comment')->textInput(['maxlength' => true]);
?>
<div id="existing-user" style="display:none;">
<fieldset>
<legend><?php
echo Yii::t('project', 'Existing user');
?>
</legend>
<?php
echo Html::button(Yii::t('user', 'New User'), ['onClick' => 'js:newContact()', 'class' => 'btn btn-default']);
?>
示例10:
<div class="col-sm-6">
<?php
$availableStadiums = [];
if (!$model->isNewRecord) {
$stadium = Stadium::findOne($model->stadium_id);
if (isset($stadium->id)) {
$availableStadiums = [$stadium->id => $stadium->name];
}
}
echo $form->field($model, 'stadium_id')->widget(SelectizeDropDownList::classname(), ['loadUrl' => Url::to(['stadium/stadium-list']), 'items' => $availableStadiums, 'options' => ['multiple' => false], 'clientOptions' => ['valueField' => 'value', 'labelField' => 'text', 'persist' => false]]);
?>
</div>
<div class="col-sm-6">
<?php
echo $form->field($model, 'date')->widget(DateTimePicker::classname(), ['options' => ['placeholder' => 'Выберите дату матча'], 'removeButton' => false, 'language' => 'ru-RU', 'pluginOptions' => ['language' => 'ru', 'autoclose' => true, 'format' => 'dd.mm.yyyy hh:ii']]);
?>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<?php
$availableTeams = [];
if (!$model->isNewRecord) {
$team = Team::findOne($model->command_home_id);
if (isset($team->id)) {
$availableTeams = [$team->id => $team->name];
}
}
echo $form->field($model, 'command_home_id')->widget(SelectizeDropDownList::classname(), ['loadUrl' => Url::to(['team/team-list']), 'items' => $availableTeams, 'options' => ['multiple' => false], 'clientOptions' => ['valueField' => 'value', 'labelField' => 'text', 'persist' => false]]);
示例11:
//= $form->field($model, 'feature')->textInput()
?>
<?php
echo $form->field($model, 'subject')->textInput(['maxlength' => 50]);
?>
<?php
echo $form->field($model, 'summary')->textarea(['maxlength' => 200]);
?>
<?php
echo $form->field($model, 'start_time')->widget(DateTimePicker::classname(), ['name' => 'start_time', 'type' => 2, 'pickerButton' => ['icon' => 'calendar'], 'options' => ['class' => 'form-control input-sm'], 'size' => 'md', 'pluginOptions' => ['format' => 'yyyy-mm-dd hh:ii', 'todayHighlight' => true, 'autoclose' => true, 'minView' => 0]]);
?>
<?php
echo $form->field($model, 'end_time')->widget(DateTimePicker::classname(), ['name' => 'end_time', 'type' => 2, 'pickerButton' => ['icon' => 'calendar'], 'options' => ['class' => 'form-control input-sm'], 'size' => 'md', 'pluginOptions' => ['format' => 'yyyy-mm-dd hh:ii', 'todayHighlight' => true, 'autoclose' => true, 'minView' => 0]]);
?>
<?php
echo $form->field($model, 'config')->textInput(['maxlength' => 500]);
?>
<?php
//= $form->field($model, 'create_time')->textInput()
?>
<?php
//= $form->field($model, 'update_time')->textInput()
?>
<?php
示例12:
$form = ActiveForm::begin(['action' => ['index'], 'method' => 'get', 'type' => ActiveForm::TYPE_INLINE]);
?>
<?php
echo $form->field($model, 'serial');
?>
<?php
echo $form->field($model, 'number');
?>
<?php
echo $form->field($model, 'expires_date')->widget(DateTimePicker::classname(), ['options' => ['placeholder' => 'Enter expires date'], 'pluginOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd hh:ii:ss']]);
?>
<?php
echo $form->field($model, 'release_date')->widget(DateTimePicker::classname(), ['options' => ['placeholder' => 'Enter release date'], 'pluginOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd hh:ii:ss']]);
?>
<?php
$status_list = ['Активна', 'Неактивна', 'Просроченна'];
?>
<?php
echo $form->field($model, 'status')->dropDownList($status_list, ['prompt' => 'Выберете статус']);
?>
<?php
// echo $form->field($model, 'using_date')
?>
<?php
// echo $form->field($model, 'cash')
?>
示例13:
<?php
echo $form->field($model, 'password_repeat')->passwordInput();
?>
<?php
foreach ($roles as $row) {
$CT_IDS[$row['description']] = $row['description'];
}
?>
<?php
echo $form->field($model, 'usermode')->dropDownList($CT_IDS, ['prompt' => 'Select Role']);
?>
<?php
echo $form->field($model, 'active_date')->widget(DateTimePicker::classname(), ['options' => ['placeholder' => 'Active Date'], 'pluginOptions' => ['autoclose' => true]]);
?>
<?php
echo $form->field($model, 'flag_multiple')->dropDownList(Yii::$app->params['flag_multiple']);
?>
<?php
echo $form->field($model, 'rtries_count', ['inputOptions' => ['value' => 3]])->textInput();
?>
<?php
echo $form->field($model, 'passage1', ['inputOptions' => ['value' => 100]])->textInput();
?>
<?php
echo $form->field($model, 'passage2', ['inputOptions' => ['value' => 100]])->textInput();
示例14: date
/* @var $this yii\web\View */
/* @var $model app\models\History */
/* @var $form yii\widgets\ActiveForm */
?>
<div class="history-form">
<?php
$form = ActiveForm::begin();
?>
<?php
echo $form->field($model, 'number')->widget(\yii\widgets\MaskedInput::className(), ['mask' => '9999 9999 9999 9999'])->textInput(['placeholder' => '9999 9999 9999 9999', 'value' => $number, 'readonly' => '']);
?>
<?php
echo $form->field($model, 'use_date')->widget(DateTimePicker::classname(), ['options' => ['placeholder' => 'Choose date and time'], 'convertFormat' => true, 'pluginOptions' => ['format' => 'yyyy-MM-dd HH:i', 'startDate' => date('yyyy-MM-dd HH:i'), 'todayHighlight' => true]]);
?>
<div class="form-group">
<?php
echo Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
</div>
<?php
ActiveForm::end();
?>
</div>
示例15:
<div class="col-xs-12 col-sm-12 col-lg-12">
<?php
echo $form->field($model, 'event_detail')->textArea(['maxlength' => 255]);
?>
</div>
<div class="col-xs-12 col-sm-12 col-lg-12">
<?php
echo $form->field($model, 'event_start_date')->widget(DateTimePicker::classname(), ['type' => DateTimePicker::TYPE_INPUT, 'options' => ['placeholder' => '', 'readOnly' => true], 'pluginOptions' => ['autoclose' => true, 'maxView' => 0, 'startView' => 0, 'format' => 'dd-mm-yyyy hh:ii:ss']]);
?>
</div>
<div class="col-xs-12 col-sm-12 col-lg-12">
<?php
echo $form->field($model, 'event_end_date')->widget(DateTimePicker::classname(), ['type' => DateTimePicker::TYPE_INPUT, 'options' => ['placeholder' => '', 'readOnly' => true], 'pluginOptions' => ['autoclose' => true, 'format' => 'dd-mm-yyyy hh:ii:ss']]);
?>
</div>
<div class="col-xs-12 col-sm-12 col-lg-12">
<?php
echo $form->field($model, 'event_type')->dropDownList([1 => 'Holiday', 2 => 'Important Notice', 3 => 'Meeting', 4 => 'Messages'], ['prompt' => Yii::t('dash', '--- Select Type ---')]);
?>
</div>
<div class="form-group col-xs-12 col-sm-6 col-lg-5 no-padding edusecArLangCss">
<div class="col-xs-6">
<?php
echo Html::submitButton($model->isNewRecord ? Yii::t('dash', 'Create') : Yii::t('dash', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success btn-block' : 'btn btn-info btn-block']);
?>