Solved

Have form that when clicked needs to have calendar date picker

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

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 …
Sometimes databases have MILLIONS of records and we need a way to quickly query that table to return the results me need. Sure you could use CFQUERY but it takes too long when there are millions of records. That is why SOLR was invented. Please …
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

744 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

12 Experts available now in Live!

Get 1:1 Help Now