Solved

Have form that when clicked needs to have calendar date picker

Posted on 2008-10-08
1
429 Views
Last Modified: 2012-05-05
Need a ColdFusion solution.

 I have a form used for scheduling.  The end user needs to pick a beginning date and end date.  My goal is to do something like any of the travel sites do for those fields.  For instance orbitz.com.  When you click on the "leave" or "return" fields a small square window with a calendar pops up.  When the date is selected it's submitted with the rest of the form.  

I can't attach a code snippet as I have no idea how to do this.  

Thanks for your help!


0
Comment
Question by:IRHusker
1 Comment
 
LVL 27

Accepted Solution

by:
azadisaryev earned 500 total points
ID: 22674974
there are literally hundreds of available solutions for this. just googling "lavascript popup calendar" will bring many good solutions.
if you are on cf8, it has one built in if you use <cfinput type="datefiled">. however, i find that one quiet a bit limited and not easily customized. but it works.

the one i love best and use most is the jQuery UI datepicker:
http://docs.jquery.com/UI/Datepicker for general info
http://ui.jquery.com/repository/latest/demos/functional/#ui.datepicker for an excellent demo and code samples

in its most simple form all you need is:
1) download jqeury js library from http://docs.jquery.com/Downloading_jQuery
2) download jQuery UI library from http://ui.jquery.com/,
or just the datepicker (that's all you really need from the UI library) from http://marcgrabanski.com/pages/code/jquery-ui-datepicker
3) add
<script src="path/to/jquery.js"></script>
<script src="path/to/ui.datepicker.js"><script>
<link rel="stylesheet" href="path/to/ui.datepicker.css" type="text/css" />
<script>
$(document).ready(function(){
  $("#id_of_your_date_form_field").datepicker();
});
</script>

that's it.

the demos and examples page i mentioned above will show you how to customize it in any which way you want.

hth
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Hi, I will be creating today a basic tutorial on how we can create a Mail Custom Function and use it where ever we want. The main advantage about creating a custom function is that we can accommodate a range of arguments to pass to the Function and …
PROBLEM: How to add your own buttons to the bottom toolbar with paging info ( result count ). While creating a cfgrid, I ran into an issue where I wanted to embed my own custom buttons where the default ones ( insert / delete / etc… ) are for aes…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

863 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

24 Experts available now in Live!

Get 1:1 Help Now