Matt Backslash
Matt Backslash

Reputation: 804

CakePHP FormHelper Input Date

I have following question. When I use this Helper:

echo $this->Form->input('start_date', array('required'=>false, 'class'=>'form-control date'));

I get following output:

Where can I change this output type? I tried it in

/lib/Cake/View/Helper/FormHelper.php

I found in this lib file, that the Helper gets the function __getInput() and in the date case, following sub function:

case 'date':
   $options['value'] = $selected;
   return $this->dateTime($fieldName, $dateFormat, null, $options);

But in the function dateTime() I got lost. Is there any updated Helper out or is there a simple trick to change the HTML-output format?

Thanks & regards

Upvotes: 1

Views: 1316

Answers (1)

Bart
Bart

Reputation: 1268

Set input type as text

echo $this->Form->input('start_date', array('type'=>'text','required'=>false, 'class'=>'form-control date'));

Upvotes: 2

Related Questions