0

I use FormHelper::dateTime for DATE format.

Anybody know how to add each other class for days, months and years?

1 Answer 1

2

below cakephp code will generate same dropdown box with given default value and the post data will be same :

echo $this->Form->day('Profile.dob', array('empty'=>'Day','class' => 'cls-day'));
echo $this->Form->month('Profile.dob', array('empty'=>'Month','class' => 'cls-month'));
echo $this->Form->year('Profile.dob', 1950, date('Y'),array('empty'=>'Year','class' => 'cls-year'));
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.