When a use clicks the datefield, popup cfcalendar

I am using coldfusion datefields in many of my apps.  Lots of times my users will just click in the datefield instead of the calendar image next to it to launch the cfcalendar.  I would like to launch the calendar when the user clicks in the datefield.
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

azadisaryevConnect With a Mentor Commented:
with a little bit of jQuery you can do anything!


<!--- in the HEAD section of your page: --->
<script type="text/javascript" src="path/to/jquery.js"></script>
<script type="text/javascript">
var showDP = function(el, f) {$('#'+el+f+'_cf_container').show();}
<!--- your form --->
<cfform name="f1" action="" method="post">
<cfinput type="datefield" name="date1" onClick="showDP(this.id, this.form.id);">

Open in new window

albrandwoodConnect With a Mentor Commented:
The calendar used is based on http://developer.yahoo.com/yui/docs/YAHOO.widget.Calendar.html

You could probably trigger the calendar to show with a command along the lines of:
_cf_DATEFIELD_init_1238461937299.show() ... the problem is that the function name is dynamically generated by CF.

This is the primary reason I don't use the dynamic Javascript built by CFForms.  I'd rather integrate the yahoo Calendar widget myself, and know the API entrypoints.

So good luck (and I'm gonna keep monitoring this thread, just incase there is an easy solution)
MFredinAuthor Commented:
Thanks Azadi!!!! jQuery rocks!!
All Courses

From novice to tech pro — start learning today.