Solved

ColdFusion CFINPUT : TYPE="DATEFIELD"

Posted on 2010-09-10
5
1,212 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 19

Expert Comment

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

Author Comment

by:hefterr
ID: 33647124
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
ID: 33648833
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
ID: 33653220
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
ID: 33662527
Hi js vaughn.
Tested you css and it works great!!  Thanks again,
hefterr
0

Featured Post

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

One of the typical problems I have experienced is when you have to move a web server from one hosting site to another. You normally prepare all on the new host, transfer the site, change DNS and cross your fingers hoping all will be ok on new server…
Periodically we have to update or add SSL certificates for customers. Depending upon your hosting plan you may be responsible for the installation and/or key generation. In the wake of Heartbleed many sites were forced to re-key. We will concen…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

734 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