1

I was wondering if anyone else is experiencing this behavior with HTMLHelper::calendar() fields and how you may be handling it in forms.

echo HTMLHelper::calendar("now", 'calendar', 'calendar', "%Y-%m-%d", array('weekNumbers'=>false, 'showTime' => false, 'fillTable' => true));

The above code renders the calendar field as expected but the behavior is a bit strange. When you choose a date the data attribute for data-alt-value gets updated but the field value doesn't change to the newly selected date. This is causing the field to submit the original date instead of the selected date in the form.

Also when you select a date it is adding the time in the date field even with showTime is set to false. Anyone have any thoughts on this?

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.