JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingJavaScript Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today!
  #1  
Old June 9th, 2003, 12:44 PM
cinners cinners is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2003
Location: Pennsylvania
Posts: 30 cinners User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Question Date Picker

In the toolbox for webform is there a datepicker? I can find one for a window form but not for a web form Does one exist or does micrsoft not support it for web forms? Or must one rely on dropdown boxes for Month Day and Year?

Reply With Quote
  #2  
Old June 9th, 2003, 03:08 PM
moojjoo moojjoo is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Location: NC
Posts: 32 moojjoo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Send a message via AIM to moojjoo Send a message via MSN to moojjoo
Best Date Picker Around

If you know any javascript and html here is the best date picker around...

I use this everywhere...I don't take the credit for creating it, but the creator is in the code.

Just copy the code to a folder called datapicker on your server and follow the example.asp page for inserting HTML into any web page you want on your server for the date picker to work...
Attached Files
File Type: zip datepicker.zip (8.5 KB, 11139 views)
__________________
Moojjoo

Reply With Quote
  #3  
Old June 9th, 2003, 03:09 PM
moojjoo moojjoo is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Location: NC
Posts: 32 moojjoo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Send a message via AIM to moojjoo Send a message via MSN to moojjoo
Example in action


Reply With Quote
  #4  
Old June 9th, 2003, 06:43 PM
stumpy's Avatar
stumpy stumpy is offline
May contain nuts.
Dev Articles Regular (2000 - 2499 posts)
 
Join Date: Aug 2002
Location: Sydney, AU
Posts: 2,058 stumpy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 6 m 11 sec
Reputation Power: 8
Send a message via ICQ to stumpy Send a message via MSN to stumpy
Wow! That picker is a pearler moojjoo. I've recently needed a date picker on two seperate projects. I'll be using this one now!
__________________
DevArticles Moderator
BlueSix - Web Development and Consulting

Reply With Quote
  #5  
Old July 11th, 2003, 05:42 AM
ema ema is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: italy
Posts: 3 ema User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Unhappy double form?

Datepicker is great on one field but how is it possible to make it work in the same form for 2 different input fields?
I have "arrival" and "departure" and I have tried many times..together is not working..Thanks for any help
ema

Reply With Quote
  #6  
Old July 11th, 2003, 06:24 AM
EiSa EiSa is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Sep 2002
Location: Norway
Posts: 184 EiSa User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 22 m 24 sec
Reputation Power: 6
Use one calendaricon for each field, then use this code (I have done it this way):

Arrival:
PHP Code:
<script language='javascript' src='/datepicker/popcalendar.js'></script>
<img src="/datepicker/calendaricon.gif" alt="Choose Date" border=0 onClick="popUpCalendar(this, document.all.arrival, 'dd/mm/yyyy', 0, 0)"> 

Departure:
PHP Code:
<script language='javascript' src='/datepicker/popcalendar.js'></script>
<img src="/datepicker/calendaricon.gif" alt="Choose Date" border=0 onClick="popUpCalendar(this, document.all.departure, 'dd/mm/yyyy', 0, 0)"> 

I also use <a href="javascript:"> before the img just to make the cursor change also.

By the way, why does this forum separate javascript into two words when I write it inside a code. I wrote it in one word.

Reply With Quote
  #7  
Old July 11th, 2003, 07:08 AM
dhouston's Avatar
dhouston dhouston is offline
Contributing User
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: May 2003
Location: Tennessee
Posts: 1,355 dhouston User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via ICQ to dhouston
Couldn't get that one to work in Mozilla, for whatever that's worth. I clicked and clicked on the little icon, but nothing happened.

Reply With Quote
  #8  
Old July 13th, 2003, 04:05 AM
ema ema is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: italy
Posts: 3 ema User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thanks

Your suggest was perfect,thank you!
Can I please ask you one more thing?
After I insert a date by datapicker,I pass all variables to an overcheck form,such as < %Response write arrivo%>,before insert into the database,to avoid mistakes

Unfortunately instead of date I get // which calls the javascript..
Any idea how to get printed the value made by the javascript?
Ciaoo

Reply With Quote
  #9  
Old July 13th, 2003, 05:17 AM
EiSa EiSa is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Sep 2002
Location: Norway
Posts: 184 EiSa User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 22 m 24 sec
Reputation Power: 6
Quote:
Unfortunately instead of date I get // which calls the javascript.. Any idea how to get printed the value made by the javascript?

I'm not sure what you mean with this, but perhaps it's the / that causes the trouble. Personally I write dates in this format; yyyy-mm-dd because I use a Access database, and Access doesn't love date's submitted in the format dd-mm-yyyy.

I see that you are using ASP, if you wan't to I can drop you my coding to make the date be written like this: yyyy-mm-dd.
__________________
Strictly CSS | Poker Cognac XO

Last edited by EiSa : July 5th, 2004 at 05:43 PM.

Reply With Quote
  #10  
Old July 13th, 2003, 06:22 AM
ema ema is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: italy
Posts: 3 ema User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thanks for reply,
More than date format problem is just print at video the selected date.For example.I'm using a javascript to hide "mailto:" to spammers.

<a href="javascript://"onClick="sendmail('info@anticopozzo.com');return false">info@anticopozzo.com</a>

If I select the mail link,show "javascript://"


This exactly happens with my form,I can not get any date or number in the overcheck form but // ,they just don't pass throught

If i digit a date manually,date pass throught to the next form,ready to be inserted in db access..
Hope you undertand my bad english
Ciaoo
ema

Reply With Quote
  #11  
Old July 18th, 2003, 11:57 AM
crazed_canuck crazed_canuck is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 1 crazed_canuck User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Is this script cross-browser compatible? I couldn't get it to work in Mozilla either...

Reply With Quote
  #12  
Old July 20th, 2003, 12:58 PM
EiSa EiSa is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Sep 2002
Location: Norway
Posts: 184 EiSa User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 22 m 24 sec
Reputation Power: 6
Don't think so. Work's in IE and Opera, but not in Netscrape.

Reply With Quote
  #13  
Old August 12th, 2003, 12:11 PM
mkeyes mkeyes is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 1 mkeyes User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I got it to work in Mozilla 1.4 by using the form name instead of "all" in the onclick:
IE only:
Code:
onClick="popUpCalendar(this, document.all.arrival, 'dd/mm/yyyy', 0, 0)"

IE 6 and Mozilla (and probably IE 5.0+, haven't tested it)
Code:
onClick="popUpCalendar(this, myFormName.arrival, 'dd/mm/yyyy', 0, 0)"

What a nice script!

Reply With Quote
  #14  
Old January 2nd, 2004, 12:03 PM
joyal422 joyal422 is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Posts: 1 joyal422 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to joyal422
Question does this work in basic html pages?

I am having issues. Keeps telling me the Calendar object is not defined.

Anybody else run into this issue?

Reply With Quote
  #15  
Old January 3rd, 2004, 05:33 PM
MadCowDzz's Avatar
MadCowDzz MadCowDzz is offline
I'm Internet Famous
Dev Articles Frequenter (2500 - 2999 posts)
 
Join Date: Jan 2003
Location: Toronto, Canada
Posts: 2,890 MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Week 16 h 4 m 48 sec
Reputation Power: 8
This little calendar looks awesome! Too bad its not cross-browser compatible (minor tweaks)...

joyal422, what version browser are you running?

Reply With Quote
  #16  
Old February 23rd, 2004, 07:16 AM
Ranju Ranju is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 1 Ranju User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thumbs up It is cross browser compatible afterall !

WHy dont u add an ID to the text field and refrence it by "getElementByID('id')" method.

It seems to work after that !

eg:
<input type="text" id="Arrival" name="Arrive" value="">&nbsp;<img src="images/calendaricon.gif" height="17" width="17" border=0 onClick="popUpCalendar(this, document.getElementById('Arrival'), 'm-dd-yyyy', 0, 0)">

does it work now ?!?...lemme know.

Reply With Quote
  #17  
Old February 24th, 2004, 04:00 AM
ramji ramji is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 2 ramji User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thumbs up koooool buddy

Quote:
Originally Posted by Ranju
WHy dont u add an ID to the text field and refrence it by "getElementByID(