Solved

ColdFusion CFINPUT : TYPE="DATEFIELD"

Posted on 2010-09-10
5
1,167 Views
Last Modified: 2013-12-24
Hi,
I have a question about the icon that displays when using the Type="Datefield" feature.

Q:  Is there a way to have the mouse arrow turn to a hand (link hover) when it is over the calendar icon associated with this very nice CF feature?

Thanks in advance,
hefterr
0
Comment
Question by:hefterr
  • 3
5 Comments
 
LVL 19

Expert Comment

by:erikTsomik
Comment Utility
just use the css to do this
give the <cfinput an ID
0
 
LVL 1

Author Comment

by:hefterr
Comment Utility
Hi erikTsomik,
Thanks for the quick answer.

Could you please "hum a few bars" as there is no "anchor tag" to add the css hover effect?  The code is : <cfinput name="fromDate" type="datefield" class="inputboxShort"  required="no" size="40" maxlength="10" readonly="readonly" />

Thanks,
hefterr
0
 
LVL 10

Accepted Solution

by:
js_vaughan earned 500 total points
Comment Utility
The code will vary, based on the name of your form, but basically, the calendar image is automatically assigned an id like so: [field name][form name]_cf_button.  The code sample below, for example, would have coldfusion produce this calendar image:

<img id="fromDatemyForm_cf_button" src="/CFIDE/scripts/ajax/resources/cf/images/DateChooser.png"/>

Your css should then match the generated id
<html>

<head>

	<title>Experts-Exchange</title>

	<style type="text/css">

		#fromDatemyForm_cf_button {

			cursor: pointer;

		}

	</style>

</head>



<body>



<cfform name="myForm">

	<cfinput name="fromDate" type="datefield" class="inputboxShort"  required="no" size="40" maxlength="10" readonly="readonly" />

</cfform>



</body>

</html>

Open in new window

0
 
LVL 1

Author Comment

by:hefterr
Comment Utility
Hi js vaughn,
This solution sounds TERRIFIC!  I won't be able to try it until Monday as I am away.   I didn't even know there was a CSS attribute for the cursor - as I never needed it before.  I also didn't realize the image was assigned a generated ID.

Thanks again,
hefterr

0
 
LVL 1

Author Comment

by:hefterr
Comment Utility
Hi js vaughn.
Tested you css and it works great!!  Thanks again,
hefterr
0

Featured Post

Scale it in WD Gold

With up to ten times the workload capacity of desktop drives, WD Gold hard drives employ advanced technology to deliver among the best in reliability, capacity, power efficiency and performance.

Join & Write a Comment

A web service (http://en.wikipedia.org/wiki/Web_service) is a software related technology that facilitates machine-to-machine interaction over a network. This article helps beginners in creating and consuming a web service using the ColdFusion Ma…
In our day to day coding, how many times have we come across a necessity to check whether a URL is a broken link or not? For those of you that answered countless and are using ColdFusion like myself, then this article is for you.  It will show yo…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now