Page 1 of 1
dynamic calendar in PHP
Posted: Fri Mar 02, 2007 3:03 pm
by hrubos
Who know the code about canlendar and when can click into this calendar and we get a date to insert into database???
Thank in advance
Posted: Fri Mar 02, 2007 3:07 pm
by Luke
sounds like a job for javascript:
http://www.mattkruse.com/javascript/calendarpopup/
This is not a PHP issue... moved to client side.
Posted: Fri Mar 02, 2007 3:16 pm
by hrubos
And would you mind showing me to use javascript in PHP?
Posted: Fri Mar 02, 2007 4:33 pm
by feyd
You don't use Javascript in PHP.
Posted: Sat Mar 03, 2007 2:49 am
by hrubos
in this web, how should I do to get source code, because I have tried to see this code HTML and have tried to run but it didn't run.
And I would like to display this calendar in my web(not use link select to display).
Thank in advance
Posted: Sat Mar 03, 2007 9:30 pm
by califdon
As was said before, this must be done in the browser, so it can't be a PHP solution. Your HTML source must use something like the Javascript code that you were given a link to. Download that and use it in your HTML source file.
Posted: Sat Mar 03, 2007 10:44 pm
by Luke
in this web, how should I do to get source code, because I have tried to see this code HTML and have tried to run but it didn't run.
And I would like to display this calendar in my web(not use link select to display).
Why don't you try reading the instructions? The guy put just about every possible implementation of a javascript popup calendar on that page. PHP is executed on the server, so there is no possible way for PHP to pop up a calendar in your browser. By the time you see the HTML in your browser, PHP has long since finished its work.
Here is the easiest possible implementation of the calendar I posted a link to:
http://www.mattkruse.com/javascript/cal ... imple.html
Posted: Sun Mar 04, 2007 4:18 am
by Mordred
I use this one (LGPL)
http://www.dynarch.com/projects/calendar/, it's quite good and complete in features.
I also has PHP API to ease the tasks of generating the related html.
Posted: Sun Mar 04, 2007 2:44 pm
by Luke
that's an awesome calendar... the only thing I can see that I don't like so much about it is that its ui seems to be geared more towards tech savvy people. My mom wouldn't be able to figure out how to change the year quickly (by clicking and holding down the mouse on the >> and << buttons). Other than that, it's awesome.
Posted: Mon Mar 05, 2007 6:12 am
by Kieran Huggins
jquery has an awesome solution for this as well (extends a text input)
http://kelvinluck.com/assets/jquery/datePicker/