Solved

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

Posted on 2008-06-12
10
224 Views
Last Modified: 2012-06-21
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
Comment
Question by:Football33Football
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 4
10 Comments
 
LVL 24

Accepted Solution

by:
glcummins earned 125 total points
ID: 21773046
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
 

Author Comment

by:Football33Football
ID: 21773710
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
 
LVL 24

Expert Comment

by:glcummins
ID: 21773775
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
Independent Software Vendors: 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!

 

Author Comment

by:Football33Football
ID: 21777709
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
 
LVL 24

Expert Comment

by:glcummins
ID: 21778272
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
 

Author Comment

by:Football33Football
ID: 21778528
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
 

Author Comment

by:Football33Football
ID: 21790352
just checking back
0
 
LVL 24

Expert Comment

by:glcummins
ID: 21793347
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
 

Author Comment

by:Football33Football
ID: 21798328
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
 

Author Comment

by:Football33Football
ID: 21805870
Managed to get it to work. Thanks a lot for the help
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

Suggested Solutions

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

730 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