I have a long list of items with date fields. Allowing jQuery to assign the datepicker to all the items with the class of datepicker is creating a pop up script (something to the effect of the script is runnning a really long time, do you want to stop the script, yes or no) not to mention it is taking a while for the document be rendered. When we remove the datepicker class, the page is rendered almost immediately. So, what I’d like to do is have the input field where the date would normally be populated with a trigger (link or graphic) that can be clicked to fire the datepicker popup calendar. This way, we only need to provide the popup calendar only on the field that actually needs it.
IDs are not available, only the name attribute is.
<tr>
<td><input type='text' name='StartDate' /> <span onclick='ShowCalendar()'>Calendar</span></td>
<td>other fields</td>
<td>more fields</td>
</tr>
I tried the following:
Using this answer, I constructed the above solution:
How to run date picker on the first onclick event?