当前位置: 首页>>代码示例>>PHP>>正文


PHP DatePicker::className方法代码示例

本文整理汇总了PHP中dosamigos\datepicker\DatePicker::className方法的典型用法代码示例。如果您正苦于以下问题:PHP DatePicker::className方法的具体用法?PHP DatePicker::className怎么用?PHP DatePicker::className使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在dosamigos\datepicker\DatePicker的用法示例。


在下文中一共展示了DatePicker::className方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: date

 /**
  * Поле выбора даты
  * @return string
  * @throws \Exception
  */
 public function date()
 {
     if ($this->model->getIsNewRecord()) {
         $this->model->{$this->attribute} = time();
     }
     $this->model->{$this->attribute} = date('d.m.Y', $this->model->{$this->attribute});
     return $this->widget(DatePicker::className(), ['model' => $this->model, 'attribute' => $this->attribute, 'clientOptions' => ['autoclose' => true, 'format' => 'dd.mm.yyyy']]);
 }
开发者ID:h11Nox,项目名称:slug,代码行数:13,代码来源:ActiveField.php

示例2: function

    <?php 
echo $form->field($model, 'name')->textInput(['maxlength' => true]);
?>

    <?php 
echo $form->field($model, 'author_id')->dropDownList(ArrayHelper::map(Author::find()->orderBy(['lastname' => SORT_ASC])->asArray()->all(), 'id', function ($model, $defaultValue) {
    return $model['lastname'] . ' ' . $model['firstname'];
}), ['prompt' => '---выберите автора---']);
?>

    <?php 
$model->date = preg_replace('/(\\d{4})-(\\d{2})-(\\d{2})/', '\\3.\\2.\\1', $model->date);
?>
    <?php 
echo $form->field($model, 'date')->hint('пример: 04.12.1975 (число.месяц.год)')->widget(DatePicker::className(), ['template' => '{addon}{input}', 'language' => 'ru', 'clientOptions' => ['autoclose' => true, 'format' => 'dd.mm.yyyy', 'todayHighlight' => true]]);
?>

    <?php 
if ($model->preview != null) {
    ?>
        <div class="form-group">
            <?php 
    echo Html::img(Yii::$app->params['frontendAbsoluteURL'] . $model->preview, ['id' => 'preview', 'class' => 'img-rounded']);
    ?>
        </div>
    <?php 
}
?>

    <?php 
开发者ID:maxodrom,项目名称:testbook,代码行数:30,代码来源:_form.php

示例3:

?>

    <?php 
echo $form->field($model, 'company_name')->textInput(['maxlength' => true]);
?>

    <?php 
echo $form->field($model, 'company_email')->textInput(['maxlength' => true]);
?>

    <?php 
echo $form->field($model, 'company_address')->textInput(['maxlength' => true]);
?>

    <?php 
echo $form->field($model, 'company_start_date')->widget(DatePicker::className(), ['inline' => false, 'clientOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd']]);
?>

    <?php 
echo $form->field($model, 'file')->fileInput();
?>

    <?php 
echo $form->field($model, 'company_status')->dropDownList(['active' => 'Active', 'inactive' => 'Inactive'], ['prompt' => '- Status -']);
?>

    <div class="form-group">
        <?php 
echo Html::submitButton($model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
    </div>
开发者ID:hovantiep,项目名称:advanced,代码行数:31,代码来源:_form.php

示例4:

?>

    <?php 
echo $form->field($model, 'numPeriodo')->textInput(['style' => 'width:130px']);
?>

    <?php 
echo $form->field($model, 'anoPeriodo')->textInput(['style' => 'width:130px']);
?>

    <?php 
echo $form->field($model, 'dataInicioPeriodo')->widget(DatePicker::className(), ['inline' => false, 'language' => 'pt', 'template' => '{addon}{input}', 'options' => ['style' => 'width:130px'], 'clientOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd']]);
?>

    <?php 
echo $form->field($model, 'dataFimPeriodo')->widget(DatePicker::className(), ['inline' => false, 'language' => 'pt', 'template' => '{addon}{input}', 'options' => ['style' => 'width:130px'], 'clientOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd']]);
?>

    <?php 
echo $form->field($model, 'usaLaboratorio')->checkbox();
?>

    <?php 
echo $form->field($model, 'qtdVagas')->textInput(['style' => 'width:130px']);
?>

    <?php 
echo $form->field($model, 'qtdMonitorBolsista')->textInput(['style' => 'width:130px']);
?>

    <?php 
开发者ID:tammy00,项目名称:paps,代码行数:31,代码来源:_form.php

示例5:

    <?= $form->field($model, 'allowance_amount')->textInput() ?>

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

	<?= $form->field($model,'allowance_school_id')->widget(Select2::classname(),
		[
			'data'=>ArrayHelper::map(Schools::find()->all(), 'School_id','school_name'),
			'language'=>'en',
			'options'=>['placeholder'=>'Select School Name'],
			'pluginOptions'=>['allowClear'=>true],
		]) ?>

    <?= $form->field($model, 'allowance_payStatus')->dropDownList([ 'paid' => 'Paid', 'not paid' => 'Not paid', ], ['prompt' => 'Select Payment Status']) ?>
	
    <?= $form->field($model, 'allowance_paidDate')->widget(
			DatePicker::className(), [
				// inline too, not bad
				 'inline' => false, 
				 // modify template for custom rendering
			//	'template' => '<div class="well well-sm" style="background-color: #fff; width:250px">{input}</div>',
				'clientOptions' => [
					'autoclose' => true,
					'format' => 'yyyy-mm-dd'
				]
			]);?>

    <div class="form-group">
        <?= Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
    </div>

    <?php ActiveForm::end(); ?>
开发者ID:seans888,项目名称:SMF-Project,代码行数:31,代码来源:_form.php

示例6:

if ($profile->photo) {
    ?>
        <?php 
    echo "<img width='100'src='http://wemamastest.ru.mastertest.ru/web/" . $profile->photo . "' />";
    ?>
    <?php 
}
?>
    <?php 
echo $form->field($profile, 'file')->fileInput();
?>
    <?php 
echo $form->field($profile, 'location');
?>
   <?php 
echo $form->field($profile, 'birthday')->widget(DatePicker::className(), ['inline' => false, 'clientOptions' => ['autoclose' => false, 'format' => 'yyyy-mm-dd']]);
?>

    <?php 
echo $form->field($profile, 'subscribe')->widget(CheckboxX::classname());
?>
    
    

    <div class="form-group">
        <div class="col-lg-offset-3 col-lg-9">
            <?php 
echo Html::submitButton(Yii::t('user', 'Update'), ['class' => 'btn btn-block btn-success']);
?>
        </div>
    </div>
开发者ID:Kolya-an,项目名称:wemamas,代码行数:31,代码来源:_profile.php

示例7:

                   
                   
                    <div >
                        <label class="col-lg-2 control-label">Nouveau Bureau:</label>
                           <?php 
echo $form->field($bureau, 'codebureau', ['horizontalCssClasses' => ['wrapper' => 'col-sm-3']])->dropDownList(ArrayHelper::map(Bureau::find()->asArray()->all(), 'codebureau', 'codebureau'), ['prompt' => '----------Choisir le bureau----------'])->label(false);
?>
                         
                    </div>
            
                    
                    <div>
                        <label for="DateTrans" class="col-lg-2 control-label">Date de transfert:</label>
 
<?php 
echo $form->field($trans, 'dt')->widget(DatePicker::className(), ['template' => '{addon}{input}', 'clientOptions' => ['autoclose' => true, 'format' => 'dd/mm/yyyy']])->label(false);
?>
                    </div>
                    
                    
 
                    
                    
                      <div >
                        <label for="motif" class="col-lg-2 control-label">Motif du transfert:</label>
                          <?php 
echo $form->field($trans, 'motif')->textarea()->label(false);
?>
                    </div>
             
开发者ID:ikramadjissa,项目名称:Yii2Immo,代码行数:27,代码来源:_formTransfert.php

示例8:

<div class="book-form">

    <?php 
$form = ActiveForm::begin(['options' => ['enctype' => 'multipart/form-data']]);
?>

    <?php 
echo $form->field($model, 'name')->textInput(['maxlength' => true]);
?>

    <?php 
echo $form->field($model, 'preview')->fileInput();
?>

    <?php 
echo $form->field($model, 'date')->widget(DatePicker::className(), ['inline' => true, 'template' => '<div class="well well-sm" style="background-color: #fff; width:250px">{input}</div>', 'clientOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd']]);
?>

   <?php 
$authors = \app\models\Author::find()->all();
foreach ($authors as $author) {
    $data[$author->id] = $author->lastname . ' ' . $author->firstname;
}
echo $form->field($model, 'author_id')->widget(\kartik\select2\Select2::className(), ['data' => $data, 'options' => ['placeholder' => 'Выберите автора']]);
?>

    <div class="form-group">
        <?php 
echo Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
    </div>
开发者ID:serhiobb,项目名称:RGK-test,代码行数:31,代码来源:_form.php

示例9:

use yii\widgets\ActiveForm;
use auction\components\helpers\DatabaseHelper;
use dosamigos\datepicker\DatePicker;

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

<div class="auctions-form">

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

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

    <?= $form->field($model, 'start_date')->widget(DatePicker::className(),[
        'template' => '{addon}{input}',
        'clientOptions' => [
            'autoclose' => true,
            'format' => 'yyyy-mm-dd',
            'disableEntry'=>true,
        ],
        'options' => [
            'data-pjax' => false
        ]
    ]) ?>

    <?= $form->field($model, 'duration')->textInput() ?>

    <?= $form->field($model, 'amount')->textInput() ?>
开发者ID:harish-reglobbe,项目名称:Auction,代码行数:30,代码来源:_form.php

示例10:

?>

    <?php 
echo $form->field($model, 'company_email')->textInput(['maxlength' => true]);
?>

    <?php 
echo $form->field($model, 'company_address')->textInput(['maxlength' => true]);
?>

    <?php 
echo $form->field($model, 'logo')->textInput(['maxlength' => true]);
?>

    <?php 
echo $form->field($model, 'company_created_date')->widget(DatePicker::className(), ['inline' => false, 'clientOptions' => ['autoclose' => true, 'format' => 'dd-M-yyyy']]);
?>

    <?php 
echo $form->field($model, 'company_status')->dropDownList(['active' => 'Active', 'inactive' => 'Inactive'], ['prompt' => '']);
?>

    <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();
?>
开发者ID:vchandwani,项目名称:yii,代码行数:31,代码来源:_form.php

示例11:

?>

	<?php 
echo $form->field($model, 'id_role')->dropDownList(ArrayHelper::map(Role::find()->all(), 'id', 'title'))->label('Должность сотрудника');
?>

	<?php 
echo $form->field($model, 'birthday')->widget(DatePicker::className(), ['inline' => false, 'language' => 'ru', 'clientOptions' => ['autoclose' => true, 'format' => 'dd.mm.yyyy']]);
?>

	<?php 
echo $form->field($model, 'date_start')->widget(DatePicker::className(), ['inline' => false, 'language' => 'ru', 'clientOptions' => ['autoclose' => true, 'format' => 'dd.mm.yyyy']]);
?>

	<?php 
echo $form->field($model, 'date_end')->widget(DatePicker::className(), ['inline' => false, 'language' => 'ru', 'clientOptions' => ['autoclose' => true, 'format' => 'dd.mm.yyyy']]);
?>


    <?php 
echo $form->field($model, 'id_phone_code')->dropDownList(ArrayHelper::map(PhoneCode::find()->all(), 'id', 'code'))->label('Код телефона');
?>

    <?php 
echo $form->field($model, 'phone_number')->widget(MaskedInput::className(), ['name' => 'phone_number', 'mask' => '999-99-99', 'clientOptions' => ['removeMaskOnSubmit' => true]]);
?>

    <?php 
echo $form->field($model, 'id_department')->dropDownList(ArrayHelper::map(Deparment::find()->all(), 'id', 'title'))->label('Секция');
?>
开发者ID:senukartur,项目名称:Yii2_test,代码行数:30,代码来源:_form.php

示例12:

    <div class="panel panel-primary">
        <div class="panel-heading"><h4><i class="glyphicon glyphicon-shopping-cart"></i> Input Transaksi</h4></div>
        <div class="panel-body">
            <?php 
$form = ActiveForm::begin(['id' => 'dynamic-form']);
?>
            <div class="row">
                <div class="col-sm-6">
                    <?php 
// $form->field($modelTransaksi, 'kode_transaksi')->textInput()->label('No Faktur')
?>
                </div>
                <div class="col-sm-6">

                    <?php 
echo $form->field($modelTransaksi, 'tanggal')->widget(DatePicker::className(), ['clientOptions' => ['autoclose' => true, 'format' => 'dd-M-yyyy']])->label('Tanggal Transaksi');
?>
      
                </div>
            </div>
    
            <div class="row">
                <div class="col-sm-6">                                
                    <?php 
echo $form->field($modelTransaksi, 'id_pelanggan')->dropDownList($modelTransaksi->KodePelanggan(), ['prompt' => 'Select...'])->label('Nama Pelanggan');
?>
        
                </div>
                <div class="col-sm-6">                        
                    <?php 
echo $form->field($modelTransaksi, 'id_teknisi')->dropDownList($modelTransaksi->Pegawai(), ['prompt' => 'Select...'])->label('Nama Teknisi');
开发者ID:cakpep,项目名称:bengkel,代码行数:31,代码来源:_formD.php

示例13:

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

<div class="news-search">

    <?php 
$form = ActiveForm::begin(['action' => ['index'], 'method' => 'get']);
?>

    <?php 
echo $form->field($model, 'created_at')->widget(DatePicker::className(), ['language' => 'zh-CN', 'clientOptions' => ['format' => 'yyyy-MM-dd']]);
?>
    <?php 
echo $form->field($model, 'updated_at')->widget(DatePicker::className(), ['language' => 'zh-CN', 'clientOptions' => ['format' => 'yyyy-MM-dd']]);
?>
    <?php 
//echo $form->field($model, 'created_at')
?>

    <?php 
//echo $form->field($model, 'updated_at')
?>

    <div class="form-group">
        <?php 
echo Html::submitButton(Yii::t('app', 'Search'), ['class' => 'btn btn-primary']);
?>
        <?php 
echo Html::resetButton(Yii::t('app', 'Reset'), ['class' => 'btn btn-default']);
开发者ID:djc1103617718,项目名称:WangYi,代码行数:31,代码来源:_search.php

示例14:

    <div class="form-group search_box_right">
        <?php 
echo Html::a(Yii::t('app', 'Create Books'), ['create'], ['class' => 'btn btn-success', 'data-pjax' => '0', 'data-toggle' => 'modal', 'data-target' => '#create_modal']);
?>
        <div class="modal fade" id="create_modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
            <div class="modal-dialog"><div class="modal-content"></div></div>
        </div>
    </div>

    <div style="clear:both;">
        <?php 
echo $form->field($model, 'book_date_from')->label('Дата выхода книги:', ['class' => 'search_author_date_label'])->widget(DatePicker::className(), ['addon' => '', 'language' => 'ru', 'clientOptions' => ['autoclose' => true, 'format' => 'dd/mm/yyyy']])->textInput(['class' => 'form-control search_author_date_input', 'placeholder' => '31/12/2014']);
?>

        <?php 
echo $form->field($model, 'book_date_to')->label('до', ['class' => 'search_author_date_label_two'])->widget(DatePicker::className(), ['addon' => '', 'language' => 'ru', 'clientOptions' => ['autoclose' => true, 'format' => 'dd/mm/yyyy']])->textInput(['class' => 'form-control search_author_date_input', 'placeholder' => '31/02/2015']);
?>
    </div>

    <div class="form-group search_box_right">
        <?php 
echo Html::submitButton(Yii::t('app', 'Искать'), ['class' => 'btn btn-primary search_btn']);
?>
    </div>
    <div style="clear:both;"></div>

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

</div>
开发者ID:krausweb,项目名称:yiibooks,代码行数:31,代码来源:_search.php

示例15:

$form = ActiveForm::begin();
?>
              
                <div class="col-lg-4">
              <?php 
echo $form->field($affect, 'numAffectation')->textInput();
?>
                </div>
                
                
                
                
                <div class="col-lg-4">
          
<?php 
echo $form->field($dat, 'dt')->widget(DatePicker::className(), ['template' => '{addon}{input}', 'clientOptions' => ['autoclose' => true, 'format' => 'dd/mm/yyyy']])->label("Date d'affectation");
?>
                </div>
              
                <div class="col-lg-4">
                     
                           <?php 
echo $form->field($bureau, 'codebureau', ['horizontalCssClasses' => ['wrapper' => 'col-sm-3']])->dropDownList(ArrayHelper::map(Bureau::find()->asArray()->all(), 'codebureau', 'codebureau'), ['prompt' => '----------Choisir le bureau----------']);
?>
                </div>
                
                
                
                <div class="col-lg-12">

<?php 
开发者ID:ikramadjissa,项目名称:Yii2Immo,代码行数:31,代码来源:listeBienAaffecter.php


注:本文中的dosamigos\datepicker\DatePicker::className方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。