Solved

Have form that when clicked needs to have calendar date picker

Posted on 2008-10-08
1
432 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

PROBLEM:  How to open a cfwindow or run a function on double click of a cfgrid row. One of my clients wanted to be able to double click on a row item to get more detailed information about a transaction and to be able to modify the line items i…
Hi, Even though I have created this Tutorial on My personal Blog, Some people might not able to find my website, So here i am posting it again Today, from the topic it is very clear that i will be showing you here the very basic usage of how we …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

726 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