dynamic calendar in PHP

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
hrubos
Forum Contributor
Posts: 172
Joined: Sat Oct 07, 2006 3:44 pm

dynamic calendar in PHP

Post 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
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post by Luke »

sounds like a job for javascript:
http://www.mattkruse.com/javascript/calendarpopup/

This is not a PHP issue... moved to client side.
hrubos
Forum Contributor
Posts: 172
Joined: Sat Oct 07, 2006 3:44 pm

Post by hrubos »

And would you mind showing me to use javascript in PHP?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

You don't use Javascript in PHP.
hrubos
Forum Contributor
Posts: 172
Joined: Sat Oct 07, 2006 3:44 pm

Post by hrubos »

The Ninja Space Goat wrote:sounds like a job for javascript:
http://www.mattkruse.com/javascript/calendarpopup/

This is not a PHP issue... moved to client side.
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
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Post 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.
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post 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
User avatar
Mordred
DevNet Resident
Posts: 1579
Joined: Sun Sep 03, 2006 5:19 am
Location: Sofia, Bulgaria

Post 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.
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post 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.
User avatar
Kieran Huggins
DevNet Master
Posts: 3635
Joined: Wed Dec 06, 2006 4:14 pm
Location: Toronto, Canada
Contact:

Post by Kieran Huggins »

jquery has an awesome solution for this as well (extends a text input)

http://kelvinluck.com/assets/jquery/datePicker/
Post Reply