Solved

ColdFusion CFINPUT : TYPE="DATEFIELD"

Posted on 2010-09-10
5
1,185 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
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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
IIS Site Configuration Copy 2 79
AWS New EC2 Instance and EBS Storage 2 85
web & database SERVERS -- PHYSICAL & VM ? 5 72
SSL Certificate for IIS7 Site 2 59
Introduction This article explores the design of a cache system that can improve the performance of a web site or web application.  The assumption is that the web site has many more “read” operations than “write” operations (this is commonly the ca…
Lease-to-own eliminates the expenditure of hardware replacement and allows you to pay off the server over time. Usually, this is much cheaper than leasing servers. Think of lease-to-own as credit without interest.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

828 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