本文整理汇总了PHP中X2Html::activeDatePicker方法的典型用法代码示例。如果您正苦于以下问题:PHP X2Html::activeDatePicker方法的具体用法?PHP X2Html::activeDatePicker怎么用?PHP X2Html::activeDatePicker使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类X2Html
的用法示例。
在下文中一共展示了X2Html::activeDatePicker方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: renderFilterCellByType
public function renderFilterCellByType()
{
$model = $this->grid->filter;
switch ($this->filterType) {
case 'date':
return X2Html::activeDatePicker($model, $this->name);
break;
case 'dateTime':
return X2Html::activeDatePicker($model, $this->name, array(), 'datetime');
break;
}
}
示例2: array
'>
<div class="cell action-duration">
<div class="action-duration-input">
<label for="timetrack-hours"><?php
echo Yii::t('actions', 'Hours');
?>
</label>
<input class="action-duration-display" type="number" min="0" max="99"
name="timetrack-hours" />
</div>
<span class="action-duration-display">:</span>
<div class="action-duration-input">
<label for="timetrack-minutes"><?php
echo Yii::t('actions', 'Minutes');
?>
</label>
<input class="action-duration-display" type="number" min="0" max="59"
name="timetrack-minutes" />
</div>
</div>
<div class="cell">
<?php
echo CHtml::activeLabel($this->model, $this->startDateAttribute, array('class' => 'action-start-time-label'));
echo X2Html::activeDatePicker($this->model, $this->startDateAttribute, array('onClick' => "\$('#ui-datepicker-div').css('z-index', '100');", 'class' => 'action-due-date', 'id' => $this->resolveId('action-due-date')), 'datetime', array_merge(array('dateFormat' => Formatter::formatDatePicker('medium'), 'timeFormat' => Formatter::formatTimePicker(), 'ampm' => Formatter::formatAMPM()), $this->options));
echo CHtml::activeLabel($this->model, $this->endDateAttribute, array('class' => 'action-end-time-label'));
echo X2Html::activeDatePicker($this->model, $this->endDateAttribute, array('onClick' => "\$('#ui-datepicker-div').css('z-index', '100');", 'class' => 'action-complete-date', 'id' => $this->resolveId('action-complete-date')), 'datetime', array_merge(array('dateFormat' => Formatter::formatDatePicker('medium'), 'timeFormat' => Formatter::formatTimePicker(), 'ampm' => Formatter::formatAMPM()), $this->options));
?>
</div>
</div>
示例3: array
<label for="timetrack-hours"><?php
echo Yii::t('actions', 'Hours');
?>
</label>
<input class="action-duration-display" type="number" min="0" max="99"
name="timetrack-hours" />
</div>
<span class="action-duration-display">:</span>
<div class="action-duration-input">
<label for="timetrack-minutes"><?php
echo Yii::t('actions', 'Minutes');
?>
</label>
<input class="action-duration-display" type="number" min="0" max="59"
name="timetrack-minutes" />
</div>
</div>
<div class="cell">
<?php
$model->type = 'call';
echo CHtml::activeLabel($model, 'dueDate', array('class' => 'action-start-time-label'));
echo X2Html::activeDatePicker($model, 'dueDate', array('onClick' => "\$('#ui-datepicker-div').css('z-index', '100');", 'class' => 'action-due-date', 'id' => $this->resolveId('call-form-action-due-date')), 'datetime', array('dateFormat' => Formatter::formatDatePicker('medium'), 'timeFormat' => Formatter::formatTimePicker(), 'ampm' => Formatter::formatAMPM()));
echo CHtml::activeLabel($model, 'completeDate', array('class' => 'action-end-time-label'));
echo X2Html::activeDatePicker($model, 'completeDate', array('onClick' => "\$('#ui-datepicker-div').css('z-index', '100');", 'class' => 'action-complete-date', 'id' => $this->resolveId('call-form-action-complete-date')), 'datetime', array('dateFormat' => Formatter::formatDatePicker('medium'), 'timeFormat' => Formatter::formatTimePicker(), 'ampm' => Formatter::formatAMPM()));
?>
</div>
</div><!-- #action-event-panel -->
</div>
示例4: renderFilterCellByType
public function renderFilterCellByType()
{
$model = $this->grid->filter;
$fieldName = $this->name;
switch ($this->filterType) {
case 'date':
$model->{$fieldName} = Formatter::parseDate($model->{$fieldName});
return X2Html::activeDatePicker($model, $this->name);
break;
case 'dateTime':
$model->{$fieldName} = Formatter::parseDate($model->{$fieldName});
return X2Html::activeDatePicker($model, $this->name, array(), 'datetime');
break;
}
}
示例5: array
<div class="cell">
<?php
echo $form->labelEx($actionModel, 'startDate');
$actionModel->dueDate = Formatter::formatDateTime($actionModel->dueDate);
echo X2Html::activeDatePicker($actionModel, 'dueDate', $form->resolveHtmlOptions($actionModel, 'dueDate', array('onClick' => "\$('#ui-datepicker-div').css('z-index', '20');")), 'datetime', array('dateFormat' => Formatter::formatDatePicker('medium'), 'timeFormat' => Formatter::formatTimePicker(), 'ampm' => Formatter::formatAMPM(), 'changeMonth' => false));
?>
</div>
<?php
}
if ($actionModel->complete == 'Yes' || $actionModel->isTimedType) {
?>
<div class="cell">
<?php
echo $form->labelEx($actionModel, $actionModel->isTimedType ? 'endDate' : 'completeDate');
$actionModel->completeDate = Formatter::formatDateTime($actionModel->completeDate);
echo X2Html::activeDatePicker($actionModel, 'completeDate', $form->resolveHtmlOptions($actionModel, 'completeDate', array('onClick' => "\$('#ui-datepicker-div').css('z-index', '20');")), 'datetime', array('dateFormat' => Formatter::formatDatePicker('medium'), 'timeFormat' => Formatter::formatTimePicker(), 'ampm' => Formatter::formatAMPM(), 'changeMonth' => false));
?>
</div>
<?php
}
?>
</div><!-- #action-backdating -->
</div><!-- .form -->
<?php
if (!$backdating && file_exists(__DIR__ . DIRECTORY_SEPARATOR . '_actionTimersForm.php') && $actionModel->complete == 'Yes') {
$this->renderPartial('_actionTimersForm', array('model' => $actionModel, 'form' => $form));
}
?>
</div>
<?php
$this->endWidget();