Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 230
  • Last Modified:

is there a calendar i could use to auto fill in my text box

I have a web page in php that collects data from usrs and stores the data in my database.  I have to text boxes that I would like to add calenders to so the usr could select the calendar and have the dates populate to my text feild.  How can I do this. Thanks

here is my current text feilds
td><input name="DateRevoked" type="text" value="" size="15" maxlength="10" />
(yyyy/mm/dd)</td>
td><input name="CompletionDate" type="text" value=""/>(yyyy/mm/dd)</td>
0
Football33Football
Asked:
Football33Football
  • 6
  • 4
1 Solution
 
glcumminsCommented:
The "Unobtrusive Date Picker Widget" is one that I have used for a while, and is very flexible and useful. You can find it here:

http://www.frequency-decoder.com/2006/10/02/unobtrusive-date-picker-widgit-update

As I am posting this, I am having a little trouble getting that site to load, but you should be able to access it shortly.
0
 
Football33FootballAuthor Commented:
Ok I have two questions?
It looks like the zip file has a lot of files which ones would I need?

Also I would like to use the Single Input (static) DatePicker and it had this, but what do I acutlly have to do to get it to work? THanks
class=format-d-m-y divider-dash highlight-days-12 no-fade
0
 
glcumminsCommented:
You will need the following directories and their contents:

 css/
 js/
 media/

The 'css' folder contains the layout information to make the calendar look pleasing. The 'js' folder contains the Javascript code. The 'media' folder contains the images that are used in the calender.

Place all of these directories in the root (top-level) directory of your website. Then in the <head> portion of the HTML file that will use the calender, include the following lines:

<link rel="stylesheet" type="text/css" href="/css/datepicker.css" />
<script type="text/javascript" src="/js/datepicker.js"></script>

This will include the correct files into your document. Now you are ready to use the script. To make the calendar control appear, simply place the class="..." line inside the <input> tag that will receive hold the date. Mine looks like this:

<input class="w8em format-y-m-d divider-dash range-low-2008-01-01 range-high-2010-12-31" name="dp-normal-1" id="edit_expiration_date" value="" type="text" />
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
Football33FootballAuthor Commented:
glcummins,
  I can't seem to get this to work, I must be doing something wrong.  When I compile the website I have what looks like a link to the calender but nothing pops up.  It's like there is now picture for the calander.

I but this in my head tag <link rel="stylesheet" type="text/css" href="/css/datepicker.css" />
<script type="text/javascript" src="/MGCWEB/js/datepicker.js"></script>
the path to where date picker is located is C:\xampp\htdocs\MGCWEB\js and my webpages begin in the path C:\xampp\htdocs\MGCWEB.  Every thing seems fine here.

in my text box i have <td><input class="w8em format-y-m-d divider-dash range-low-2008-01-01 range-high-2010-12-31" name="CompletionDate" type="text" id="CompletionDate" value="" size="15" maxlength="10" />

any ideas?
0
 
glcumminsCommented:
The problem is likely with this line:

 <script type="text/javascript" src="/MGCWEB/js/datepicker.js"></script>


If your webpage resides in the directory 'MGCWEB', you want to change this line to:

  <script type="text/javascript" src="/js/datepicker.js"></script>

The directory 'MGCWEB' does not need to be included, because it is considered the top-level directory.
0
 
Football33FootballAuthor Commented:
glcummins,
I had as you suggested above and get the same thing as when I switced it to <script type="text/javascript" src="/MGCWEB/js/datepicker.js"></script>.  I don't see a picture of a calander or nothing.  I even tried pulling the calendar, css and .js file out of there folder and putting them under my MGCWEB section and still get the same promblem.

I'm not sure why I can't get it to work.  I'm using dreamweaver if that helps.  Would i need to add the css file or anything like that?
0
 
Football33FootballAuthor Commented:
just checking back
0
 
glcumminsCommented:
Okay, help me to understand. Your webfiles are in the MGCWEB directory, correct? When you access your site in a browser, do you browse to :

 www.yoursite.com/MGCWEB/

or to

 www.yoursite.com

?

If you use the first method, do you have access to the folder which is above MGCWEB? Or is it unwritable to you?

This will help me to better instruct you where to place the files and which <script> tag to use.

Additionally, I would recommend a thorough reading of the documentation that comes with the datepicker script, as it is most instructive.
0
 
Football33FootballAuthor Commented:
yes.  my website is located at C:\xampp\htdocs\MGCWEB the files located at

after reading a little more carfully I moved my three files css/  js/  media/ on level above my MGCWEB C:\xampp\htdocs\.

I got the calander to come up but no picture of a calander is present. I can hover over where the picture should be and my cursour turns to a hand but I can't see no calander.

I do have access to the directory above MGCWEB

0
 
Football33FootballAuthor Commented:
Managed to get it to work. Thanks a lot for the help
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 6
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now