Is there any standard way of making the date input field readonly in CakePHP.
I have the following code:
echo $this->Form->input('testDate',array(
'label' => 'date',
'dateFormat' => 'DMY',
'minYear' => date('Y') - 20,
'maxYear' => date('Y') - 0
)
)
I have tried the following way:
echo $this->Form->input('testDate',array(
'label' => 'date',
'dateFormat' => 'DMY',
'minYear' => date('Y') - 20,
'maxYear' => date('Y') - 0,
'disabled' => 'disabled'
)
)
That works fine (make the input field diable) but ofcourse I can't POST, So I tried 'readonly' => 'readonly' instead of disabled at the same way and this is not working. Do I have to use any other way (ex. Javascript)? Where am I making mistakes? Thanks for all the suggestions