|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
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?
|
|
#2
|
|||
|
|||
|
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...
__________________
Moojjoo |
|
#3
|
|||
|
|||
|
Example in action
|
|
#4
|
||||
|
||||
|
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!
|
|
#5
|
|||
|
|||
|
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 ![]() |
|
#6
|
|||
|
|||
|
Use one calendaricon for each field, then use this code (I have done it this way):
Arrival: PHP Code:
Departure: PHP Code:
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. |
|
#7
|
||||
|
||||
|
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.
|
|
#8
|
|||
|
|||
|
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 ![]() |
|
#9
|
|||
|
|||
|
Quote:
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. Last edited by EiSa : July 5th, 2004 at 05:43 PM. |
|
#10
|
|||
|
|||
|
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 |
|
#11
|
|||
|
|||
|
Is this script cross-browser compatible? I couldn't get it to work in Mozilla either...
![]() |
|
#12
|
|||
|
|||
|
Don't think so. Work's in IE and Opera, but not in Netscrape.
|
|
#13
|
|||
|
|||
|
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! |
|
#14
|
|||
|
|||
|
I am having issues. Keeps telling me the Calendar object is not defined.
Anybody else run into this issue? |
|
#15
|
||||
|
||||
|
This little calendar looks awesome! Too bad its not cross-browser compatible (minor tweaks)...
joyal422, what version browser are you running? |
|
#16
|
|||
|
|||
|
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=""> <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. |
|
#17
|
|||
|
|||
|
Quote:
koooool can I have an example script page which I can just use it in my site |
|
#18
|
|||
|
|||
|
The getElementByID will only work in the later browser versions such as Netscape 6 and IE 5 and up. I found a better calendar popup that's cross browser compatible and actually paid real money for it. Way easier to implement as well and looks great too. This calendar allows for a number of standard return and display formats -- making my life a lot easier.
Check it out http://www.kerberosdev.net/Products/02_Date_Picker.asp. |
|
#19
|
||||
|
||||
|
LOL - their second demonstration doesn't work in Firefox. Even worse is that you can't close the calendar unless you select a day....
Do you need to support v4 browers? |
|
#20
|
|||
|
|||
|
Nah - Closing the calendar is no problem - it's not explicitly mentioned there, but you can implement the thing with an option that allows you to select no date and close the dropdown (by passing a true / false parameter at initialisation). I checked in firefox and my older browsers and it seems to work fine with no problems. I won't know if the previous dp version supported it or not - I got an update from them the other day and installed it immediately. Personally I think those guys should mention more on their website (they'd sell a hell of a lot more) - You get the manual and then you find out that what's on the website is only the tip of the proverbial iceberg.
As for the V4 support - I checked out the source on the thing - not an iframe or anything like that in sight - the entire thing runs on DIV's SPAN's and whatnot + a lot of browser version checking and alternative algortihms. |
|
#21
|
|||
|
|||
|
Almost there....
Quote:
This seems to work well, but I cannot get the month and year drop down menu's to work. They will simply not expand on Mozilla. Anybody any ideas ? |
|
#22
|
|||
|
|||
|
i have tried several but this really is the best yet. but i have one problem though.
the calendar is ok on first load but once i fetched a record and tries to edit a date field, the calendar does not pop up. any work around this? many thanks! Quote:
|
|
#23
|
|||
|
|||
|
I'm glad I found this datepicker! However, I noticed that when using IE 5.2 for Mac that the wrong date is displayed as Today. I checked IE on my PC and it shows the correct date for today (Mon, 13 Dec 2004). But on IE on my Mac todays date is displayed as "Fri, 3 Dec. 2004". Does anyone know of a fix for this? Any help would be so greatly appreciated.
|
|
#24
|
|||
|
|||
|
help
hello
can anyone help me.. i encountered a problem when i collaborate the datepicker with my form but when i create a new form it runs smoothly.. the error i encountered says in internet explorer is line: 152 char: 4 Error: object required code: 0 but the code simply contains: <TD><asp:linkbutton id="LinkButton1" runat="server" Width="64px" Height="24px">Origination</asp:linkbutton> but when i tried deleting some lines i found the error when the form load my command there is table.visible = false but when i comment the table.visible = false the datepicker is running fine.. but when i tried it with a new form.. i tried hiding it and unhiding it.. the datepicker is running fine do you know what seems to be the problem? thanks |
|
#25
|
|||
|
|||
|
the error suddenly been fix..
wahhh thanks anyway |
|
#26
|
|||
|
|||
|
And How can I change the default date that appears in the Calendar Box? It allways displays the current date, and I want to set default to 1/1/1980.
Thanx |
|
#27
|
|||
|
|||
|
Hello,
I try to use this marvellous date picker in my date search field but... <input id="Arrival" NAME="xyz" VALUE="<%=strDate%>" size="20"></font> <img src="/datepicker/calendaricon.gif" alt="Choose Date" border=0 onClick="popUpCalendar(this, document.all.xyz, 'dd/mm/yyyy', 0, 0)"> But when I click a date in the calendar, instead of calendar cto close and date selected is to appear on the textbox, a new page pops up with the following url: javascript:dateSelected=4;closeCalendar(); What may be the cause for this? Thanks |
|
#28
|
|||
|
|||
|
Its OK I justed sussed it out. it was to do with the page target.
Well thanks everyone in this thread, as this is a great calendar and some great comments. |
![]() |
| Viewing: Dev Articles Community Forums > Programming > JavaScript Development > Date Picker |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|