activeDateField() 공개 정적인 메소드

Generates a date field input for a model attribute.
또한 보기: self::activeTextInputField
public static activeDateField ( CModel $model, string $attribute, array $htmlOptions = [] ) : string
$model CModel the data model.
$attribute string the attribute.
$htmlOptions array additional HTML attributes.
리턴 string the generated input field.
예제 #1
0
 /**
  * Renders a date field for a model attribute.
  * @param CModel $model the data model.
  * @param string $attribute the attribute.
  * @param array $htmlOptions additional HTML attributes.
  * @return string the generated input field.
  */
 public function dateField($model, $attribute, $htmlOptions = array())
 {
     return TbHtml::activeDateField($model, $attribute, $htmlOptions);
 }
예제 #2
0
 public function testActiveDateField()
 {
     $I = $this->codeGuy;
     $html = TbHtml::activeDateField(new Dummy(), 'date', array('class' => 'input'));
     $input = $I->createNode($html, 'input[type=date]');
     $I->seeNodeAttributes($input, array('class' => 'input', 'id' => 'Dummy_date', 'name' => 'Dummy[date]', 'value' => '2013-08-28'));
 }
예제 #3
0
 /**
  * Renders a date field for a model attribute.
  * This method is a wrapper of {@link TbHtml::activeDateField}.
  * Please check {@link TbHtml::activeDateField} for detailed information
  * about the parameters for this method.
  * @param CModel $model the data model
  * @param string $attribute the attribute
  * @param array $htmlOptions additional HTML attributes.
  * @return string the generated input field
  * @since 1.1.11
  */
 public function dateField($model, $attribute, $htmlOptions = array())
 {
     return $this->wrapControl(TbHtml::activeDateField($model, $attribute, $htmlOptions));
 }