Yogs
Yogs

Reputation: 80

Datepicker plugin not working in a textarea

I am unable to include Datepicker on a textarea. I had successfully used it in CodeIgniter but when I tried to put it in osCommerce, it's not working. I am not using any template or other addons in osCommerce.

In the below code segment I'm trying to have the Datepicker work for the textarea named comments:

<tr><td class="main" width="75%"><b><?php echo //DELIVERY_INFO;?></b></td></tr>
</table>
<table border="0" width="100%" cellspacing="0" cellpadding="2" >
<tr>
<td id="datepicker"><?php echo tep_draw_textarea_field('comments', 'soft', '60', '5'); ?></td>
</tr>                      
</table>

Upvotes: 0

Views: 949

Answers (1)

Farhan Ahmad
Farhan Ahmad

Reputation: 5198

The datepicker isn't supported with a textarea element, specifically it's supported with span and div elements for inline mode and only input elements otherwise.

Reference

Here is the recommended way to use a datepicker:

$("#datepicker").datepicker();

HTML:

<input id="datepicker" type="text">

Upvotes: 1

Related Questions