TbHtml::activeDateFieldControlGroup PHP Method

activeDateFieldControlGroup() public static method

Generates a control group with a date field for a model attribute.
See also: self::activeControlGroup
public static activeDateFieldControlGroup ( CModel $model, string $attribute, array $htmlOptions = [] ) : string
$model CModel the data model.
$attribute string the attribute.
$htmlOptions array additional HTML attributes.
return string the generated control group.
    public static function activeDateFieldControlGroup($model, $attribute, $htmlOptions = array())
    {
        return self::activeControlGroup(self::INPUT_TYPE_DATE, $model, $attribute, $htmlOptions);
    }

Usage Example

Exemplo n.º 1
0
 public function testActiveDateFieldControlGroup()
 {
     $I = $this->codeGuy;
     $html = TbHtml::activeDateFieldControlGroup(new Dummy(), 'date');
     $group = $I->createNode($html, 'div.control-group');
     $label = $group->filter('label.control-label');
     $I->seeNodeChildren($label, array('input[type=date]'));
 }
All Usage Examples Of TbHtml::activeDateFieldControlGroup
TbHtml