All source code in ASP/ VbScript Ask a ASP/ VbScript Pro Discussion Forum Categories All jobs in ASP/ VbScript
Quick Search for:  in language:    
lets,click,button,text,date,fills,textbox,int
   Code/Articles » |  Newest/Best » |  Community » |  Jobs » |  Other » |  Goto » | 
CategoriesSearch Newest CodeCoding ContestCode of the DayAsk A ProJobsUpload
ASP/ VbScript Stats

 Code: 281,486. lines
 Jobs: 101. postings

 How to support the site

 
Sponsored by:

 
You are in:
 
Login

NEW! LEARNING CENTER
Special educational offers, white papers, webcasts, podcasts

  NEW! Download Rational Performance Tester V8 (download now)
  NEW! Download Rational Functional Tester V8 (download now)
  NEW! Download Rational Service Tester for SOA Quality V8 (download now)
  NEW! Teleconference: Quality In Action - Using Rational Quality Manager with Functional, Performance and Web Service Testing Products (download now)
  NEW! Introducing IBM Rational AppScan Developer Edition – easing security testing by non-security professionals (download now)

 

 


Latest postings for ASP/ VbScript.
Click here to see a screenshot of this code!Mess Officer Management System (Sistem Pengurusan Mess Pegawai)
By Mohd Fauzi on 11/23

(Screen Shot)

Click here to put this ticker on your site!


Add this ticker to your desktop!


Daily Code Email
To join the 'Code of the Day' Mailing List click here!



 
 
   

Calendar Date Picker for text boxes

Print
Email
 
winzip icon
Submitted on: 2/28/2001 5:46:44 PM
By: Jesse Goodier  
Level: Beginner
User Rating: By 8 Users
Compatibility:ASP (Active Server Pages), HTML, VbScript (browser/client side)

Users have accessed this code 56434 times.
 
author picture
 
     This lets you click a button by a text box, click a date, and it fills in the textbox for you. Instructions: unzip into a single directory and look to popupcal.asp for a demo. Added comments to popupcal.asp to answer some of the questions people have had.

 
Can't Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!

    '**************************************
    ' for :Calendar Date Picker for text box
    '     es
    '**************************************
    I found this Date picker utility on www.expedia.com
    It works really well and I would love To give the author the credit.
    if you know them, please Let me know. This calendar does Not work With netscrape.
    jesse jessegoodier@hotmail.com
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.

Virus note:All files are scanned once-a-day by Planet Source Code for viruses,but new viruses come out every day, so no prevention program can catch 100% of them.

FOR YOUR OWN SAFETY, PLEASE:
1)Re-scan downloaded files using your personal virus checker before using it.
2)NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this code, you agree to the following terms...   
1) You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.   
2) You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
3) You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
4) You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.


Other 1 submission(s) by this author

 

 
 Report Bad Submission
Use this form to notify us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:
 
Your Vote!

What do you think of this code(in the Beginner category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor See Voting Log
 
Other User Comments
6/13/2001 9:23:11 AMJesse Goodier

I updated a few things and add comments. Thanks DJ for your help.
Jesse 5/13/2001
(If this comment was disrespectful, please report it.)

 
7/3/2001 11:47:22 AMGary Faulkner

Great code!!!! To answer the question from 'sweets@aceasphalt.com', the code needs to be adjusted in 2 places. FIRST, in the call to the ShowCalendar function, the value 'document.Wiz.dimg1' needs to be incremented for each instance (ie. 'document.Wiz.dimg2', etc...). SECOND, the ID flag on the IMG also needs to be incremented for each instance as well (ie. 'id=dimg2', etc...). Hope this helps!
(If this comment was disrespectful, please report it.)

 
7/16/2001 11:36:04 AMAndrew Ryan

I've updated the code to fix a couple bugs - 1, the code doesn't check for the right month AND year when determining if you're at your start date - thus, if you specify start date of 7/6/2001, you should see July 1-5 x'd out on 2001, but before the bugfix, you'd also see it x'd out in 2002, 2003, etc... the second bug is that the picker should x out all days it can't access, so if you start out with a date beyond the maximum range, all days in that month should be x'd out. The bug fixes are:
Line 176 calendar.htm should read:

for(i=iMin;i<iMax;i++) {bdc[i].src=
(If this comment was disrespectful, please report it.)

 
7/30/2001 3:40:00 AMI. Limbeek

Nice date picker. Only how do I solve the problemen with the displayed month/year??
When the calendar open JUN 2003 is being displayed instead of JUL 2001?

Rgds.
(If this comment was disrespectful, please report it.)

 
8/2/2001 10:58:34 AMG Hall

I can only get this working for the year 1901! Any ideas? I really would like to use this code.
(If this comment was disrespectful, please report it.)

 
8/14/2001 10:41:33 AMSteven McGirr

Just what I needed but...since the date format is of USA always can I change it to UK style, ie. ddmmyy??
Ideas to: smcgirr@btinternet.com

Cheers!
(If this comment was disrespectful, please report it.)

 
8/21/2001 11:22:02 AMPaul

I am getting 1901 dates also.. Is there a fix for this?
(If this comment was disrespectful, please report it.)

 
8/21/2001 11:25:23 AMPaul Sturgill

Fixed it... I just specified the full year in the ASP and it now shows 2001.
(If this comment was disrespectful, please report it.)

 
8/22/2001 9:06:30 AMDebbie Lampon

UK Date format:

In response to Steven McGirr, change this line
function GetDateFmt() {return
(If this comment was disrespectful, please report it.)

 
8/22/2001 9:08:11 AMDebbie Lampon

UK Date format:

In response to Steven McGirr, change this line
function GetDateFmt() {return "mmddyy";}

to
function GetDateFmt() {return "ddmmyy";}

in calendar.jsp
(If this comment was disrespectful, please report it.)

 
8/24/2001 6:07:04 PMsweets@aceasphalt.com

When I upgraded to IE6 the code quit working, everything is fine on IE 5.5 or lower but not IE 6 any suggestions.
(If this comment was disrespectful, please report it.)

 
9/14/2001 2:56:31 PMprincessa15@hotmail.com

Great code !!! But I want my users in my app to be able to choose back date. How can I remove the dates from being xed and able to be picked. Thanks
(If this comment was disrespectful, please report it.)

 
10/28/2001 11:01:37 PMSam Kane

Nice Calendar!!!!

small bug: It breaks when
"date to start" and "date to end" belongs to the sme month.
(If this comment was disrespectful, please report it.)

 
3/15/2002 10:26:54 AMLuke

I would also like to back able to pick up previous dates, how can i get this bit going
(If this comment was disrespectful, please report it.)

 
3/23/2002 12:11:31 PMTom

Just what I want but keeps giving me error on page. Are there changes that need to be made to directory pointers. I put everyting in cal/ directory.
(If this comment was disrespectful, please report it.)

 
4/9/2002 9:37:00 AMedward

Awesome calendar. I'm pre-beginner and was able to figure this out in about 20 minutes. Thanks!
(If this comment was disrespectful, please report it.)

 
6/25/2002 5:04:40 PMCarissa

Great calendar. :) I am having a bit of difficulty however. I am able to use this calendar when I am running my asp pages from my own computer, but when I try to upload them to our intranet, they do not allow me to select a date. Also, they only allow me to see past dates, no future ones. Do you happen to have any suggestions as to why this might be happening? I would greatly appreciate it. :)
(If this comment was disrespectful, please report it.)

 
6/26/2002 12:04:33 PMchad

Great code !!! But I want my users in
my app to be able to choose back date.
How can I remove the dates from being
xed and able to be picked. Thanks
(If this comment was disrespectful, please report it.)

 
7/21/2002 9:58:12 PMaspgirl

Can you help me?
this code is very good,but when I use it, it always reports the error at line 117 "var r=str.charAt(0);" with "this object undefined or empty"
I will be very grateful if you can help me.

thanks a lot
(If this comment was disrespectful, please report it.)

 
9/24/2002 4:04:20 AM

I've updated calendar.js to use UK date format, but now the problem is that past dates aren't crossed out and I can't select any dates. Any ideas?
(If this comment was disrespectful, please report it.)

 
10/24/2002 10:48:33 AM

Im having the same problem, when I changed the date format in calender.js, all the dates became uncrossed and I can't select any dates at all.
(If this comment was disrespectful, please report it.)

 
10/28/2002 11:57:40 AM

Yip! Same problem as the other 2 guys
(If this comment was disrespectful, please report it.)

 
11/7/2002 11:17:52 AM

i too have changed the date to uk formtat and now it doesnt work properly :( also would it be possible to post more information on how to specify start dates / end dates and how to modify which dates are crossed out?
thanks
(If this comment was disrespectful, please report it.)

 
11/15/2002 1:45:32 PM

Why can't I get this work if I place 2 datepickers on the same page?

(If this comment was disrespectful, please report it.)

 
11/27/2002 6:22:05 PM

If someone gets a full functional one without bugs, please mail it to me!
(If this comment was disrespectful, please report it.)

 
11/27/2002 6:23:23 PM

mail it to: aelmiri@yahoo.com
(If this comment was disrespectful, please report it.)

 
12/2/2002 4:32:22 PM

I have the calendar control working great on my local machine, but I get an error message "Unbable to load Pop-Up calendar" on the server machine. Can anyone give me some insight as to correcting this problem?

(If this comment was disrespectful, please report it.)

 
4/10/2003 11:00:22 AM

How can I modify the code to go more than 1 year in the future?
(If this comment was disrespectful, please report it.)

 
4/28/2003 8:52:00 PM

This is the same; http://www.expedia.com/
(If this comment was disrespectful, please report it.)

 
5/28/2003 5:30:56 PM

I would like to have to pickers in the same form how can i do that?
(If this comment was disrespectful, please report it.)

 
5/30/2003 3:09:03 AM

Great Calendar,
but doesnot work in ie6
(If this comment was disrespectful, please report it.)

 
7/21/2003 11:10:08 AM

I can get the date picker (which is nice) to work all by its self. But when I add in additional fields or hidden fields I get errors. Has anyone had this problem or does anyone know how to fix this.

My code is available if needed. mbarbu@stph.org
(If this comment was disrespectful, please report it.)

 
8/4/2003 1:45:54 PM

The calendar works in IE6, but I found what appears to be a bug. If I choose a date from a month other than the current month and later scroll back to the current month and cancel out without picking a date, the current day remains highlighted in all the previous months.
(If this comment was disrespectful, please report it.)

 
9/25/2003 11:30:26 AM

I have been looking for a Calendar like this for ages! Why does the date return days and months as 1,2 etc instead of 01,02? What changes would I need to make to resolve this?
(If this comment was disrespectful, please report it.)

 
10/9/2003 8:40:02 AM

Did anyone get a solution to the problem with UK date format, crossed out days with this piece of code. Would really like to use it.

regards
Steven
(If this comment was disrespectful, please report it.)

 
10/9/2003 8:40:26 AM

Did anyone get a solution to the problem with UK date format, crossed out days, and leading 0 with dates for this piece of code. Would really like to use it.

regards
Steven
(If this comment was disrespectful, please report it.)

 
3/4/2004 9:53:13 AM

how to put this date picker in the same form?
(If this comment was disrespectful, please report it.)

 
1/6/2005 11:09:53 AMSimon Trundle

Many Thanks for the kick-start code Jess.

I've made several changes to get it fully working in UK mode("ddmmyy"), and fixed all the bugs I could find from the tests I did. This includes;

- expired dates being crossed out properly
- dates than exceed the maximum date in the original proc call are now crossed out properly
- the date (dd) is returned with a leading "0" if the picked date is 1-9
- Correct calendar day/month being displayed when using UK mode (even after setting the code's internal date format to UK **function GetDateFmt() {return "ddmmyy"}** the calendar would still interpret the current date as "mmddyy" and consequently display incorrecty, yet still returned in "ddmmyy" mode when picked!?!!)
(If this comment was disrespectful, please report it.)

 
1/6/2005 11:10:27 AMSimon Trundle


If anyone wants this updated version, drop me a mail. Thanks again to the original author, Jess, for this date picker.

I spent just over 7 hours debugging and fixing up this code, so I figure I may as well share my efforts an hopefully save someone else the job!

Regards, Simon

(If this comment was disrespectful, please report it.)

 
12/28/2005 5:36:32 PMBob Larkin

Hi. The company I'm working for just upgraded their web servers to 2003 and this calendar (which has been working fine for a couple of years) will not work on the new servers. I'm stumped. Anybody have any suggestions? Thanks!
(If this comment was disrespectful, please report it.)

 
12/29/2005 3:37:23 PMBob Larkin

Jesse,

Thanks for the prompt response. A colleague discovered the new servers are not mapping '*.html' to Internet Explorer. Again Thanks! Happy New Year!
(If this comment was disrespectful, please report it.)

 
3/1/2007 5:52:43 PMTyler

Hi,

I great code! I need to view back dates, any suggestions?

Thanks
(If this comment was disrespectful, please report it.)

 
Add Your Feedback!
Note:Not only will your feedback be posted, but an email will be sent to the code's author from the email account you registered on the site, so you can correspond directly.

NOTICE: The author of this code has been kind enough to share it with you.  If you have a criticism, please state it politely or it will be deleted.

For feedback not related to this particular code, please click here.
 
To post feedback, first please login.


 

Categories | Articles and Tutorials | Advanced Search | Recommended Reading | Upload | Newest Code | Code of the Month | Code of the Day | All Time Hall of Fame | Coding Contest | Search for a job | Post a Job | Ask a Pro Discussion Forum | Live Chat | Feedback | Customize | ASP/ VbScript Home | Site Home | Other Sites | Open Letter from Moderators | About the Site | Feedback | Link to the Site | Awards | Advertising | Privacy

Copyright© 1997-2008 by Exhedra Solutions, Inc. All Rights Reserved.  By using this site you agree to its Terms and Conditions.   Planet Source Code (tm) and the phrase "Dream It. Code It" (tm) are trademarks of Exhedra Solutions, Inc.