Date Picker PHP Class 1.0.1
Monday, September 04, 2006Date Picker PHP Class, News
A new version of the Date Picker PHP Class has been released. Read further to see what is new in this version of the script.
What's new in this version:
- the date/time picker now pops up as a modal window (it will stay on top of other windows until closed) and will also have the focus by default - thanks to Johan van Ieperen
- added the possibility to define for each language how the abbreviations for names of months and days should be - thanks to Johan van Ieperen
- the manual was confusing about how to use another language file - thanks to Johan van Ieperen
- fixed a bug that would scramble up days on months where first day of the week was on a Sunday - thanks to Achim from Germany
- added german language translation (thanks to Wassilios Meletiadis)
- added dutch language translation (thanks to Johan van Ieperen)
September 06, 2006 5:31 PM
Very cool and useful script. Can't tell you where I've used it, as it is in protected space (sorry.)
To move from 1.0 to 1.0.1 do I need to update all the files?
September 06, 2006 5:45 PM
i am glad you found good use for it.
and yes, all the files need to be updated from 1.0 to 1.0.1
September 07, 2006 7:46 PM
Hi Stefan. thanks for the imageresize class.. just wanto to know if its preserves png 24 transparency, cause i tryed it with no success
thanks!
September 09, 2006 10:03 PM
Hi, i've just used the files and the are really usefull. Thank you.
But there seems so be a small little problem in the function insert_id($resource = "") because is doesn't return nothing.
First tried to call the mysql_insert_id() function and it returned the correct value. So studied a bit your code, and thing you have a bug.
The database connection is keeped in the variable "link" so in the function insert_id, i guess the line 619 shouldn't be "$resource = $this->lastResult;" but should be "$resource = $this->link;".
Changed that line and now it works fine.
Ill leave you my email if you want to contact me: arlc83@gmail.com.
Cheers arlc
September 11, 2006 9:34 AM
this comment is in the wrong place, man :)
but anyway, thanks for noticing - the class doesn't preserve transparency for png24. an updated version of the class will be released this week which will contain a fix for this issue.
thanks!
September 11, 2006 9:37 AM
grrr, another comment in the wrong place!
anyways, thanks for finding and reporting the bug in the Database Wrapper Class.
a new release is coming out by the end of this week (which will have this bugfix and some new methods in it) so be sure to check back.
thanks
September 12, 2006 10:07 PM
I love the date picker script, it works on my machine with web server running but when i put it online, the calendar window gives me an error! I have not altered your code in any way. Could you please help?
http://www.qwizdom.co.uk/test/demo.php
Your files are located: qwizdom.co.uk/test/datepicker/
September 12, 2006 10:57 PM
hi matt,
there's probably an .htaccess file that redirects every PHP file...
i don't know what else could it be without having access to the files
September 14, 2006 12:14 PM
Thanks for the reply, Stefan. Any ideas on finding or creating a different .htaccess file? I don't see anything on our server. What commands do you use to bring up the menu and initialise it in the popup window?
September 15, 2006 10:25 AM
hi matt,
there's a simple javascript window.open() command that calls the datepicker.php file in the /includes folder. check if that file has its rights set to 0755.
September 22, 2006 6:45 PM
hello,
the php date picker class looks good.
but one more feature would have been great. if it had a option to allow the range of dates to be selected by the user.
say we dont want a user to select any date prior to today, though they apppear in calendar, they cant be selected.
and then say in another calendar on same page, the date has to be within x days of date selected in first one...
September 22, 2006 8:14 PM
i agree sansar :)
next version will have that. coming next week.
thanks
September 29, 2006 12:20 PM
Hi Stefan,
I like your class great work thumbs up!!!
There was a small bug in the example.php
when you pushed the button that noting showed up.
there was no "echo" command
echo $db->show("date")is the correct line
I'm looking forward to the next release. and it would be great if there came a update for the datagrid class . that you could make hyperlinks in the table's and then call a other query if I have fond how to do it I will post it.
Grtz Joeri
September 29, 2006 12:27 PM
hi joeri,
there will be an update for the data grid class but i can't tell you when will that be as right now i got a lot of work to do at my job. :( these days i will be releasing a new class (surprise, surprise ;)) and probably in two weeks time i'll start releasing updated versions of all available classes.
October 01, 2006 7:18 AM
Hello there
I found it very useful, and I'd like to contribute somehow. I created the portuguese language archive and wonder how I could send it to you.
October 01, 2006 10:16 AM
just mail the language file to "ix at nivelzero dot ro" or to "noname at nivelzero dot ro"
thanks
November 27, 2006 6:07 AM
YEAHHHH, man this scrpt rocks, thak you so much for this script...
but unfortunately i've used it on our intranet pages, srry.
November 27, 2006 11:06 AM
well, ok... :)
i won't sue you just tell me where have you used my script so i can later tell "look in how many places my scripts are used!"
or should i make my own license file?
can anyone help with that?
January 22, 2007 3:49 PM
Testing the script and works great. Will you add TIME support too?
January 22, 2007 3:54 PM
what do you mean?
January 30, 2007 8:35 PM
Great script. Iworks locally but on my remote server I have a problem. IE id doesn't open anything and in firefox I get "firefox doesn't know how to open this address because the protocol (d) is not associated with any program.
January 30, 2007 9:33 PM
tell me some details about your local server and about the remote one. maybe an url...
February 23, 2007 12:14 AM
Very nice code I would like to use it but know nothing about classes.
How about an example on how to use it for a complete novice ?
I want to put the date into a database and so need to get the date into a variable somehow?
March 13, 2007 9:48 PM
...
$dp->enableTimePicker = true;
$dp->dateFormat = "r"; //as in rfc
...
This doesn't work properly on ie7 or firefox 2.0.0.2 ... on ie7 I get only the abbreviated day (Mon, Tue, etc...) and in firefox the time / timezone offset are set to all zeros.
June 29, 2007 12:35 AM
Hi Stefan,
I downloaded and ran your datpicker example (the one packaged with gzip).
It looks great, but when you click on the arrows before or after the year, the year doesn't change.
Nor do the days in the grid change to match the month that's selected.
It only does day changes to the field.
Do you get the same results?
June 29, 2007 2:10 PM
i've seen this happening on some servers. it's happening because your PHP doesn't have the $_SERVER[
"DOCUMENT_ROOT"] variable set. edit class.datepicker.php and see the line 262.
July 06, 2007 2:11 AM
I'm having this same problem, but I am certain that my $_SERVER["DOCUMENT_ROOT"] variable is set. I can echo it to the screen on the same page as I am calling the date picker class. I see the line you mention in class.datepicker.php and I have tried inserting the actual value for the document root in there to no avail. Actually, I've had the date picker working fine on my machine for some time, but an upgrade from PHP 4.4.4 to version 5.2 seems to be likely culprit here. Any other suggestions for resolving this issue?
July 19, 2007 4:17 PM
Hi Stefan
Great script, worked first time on my local server and the on remote server.
But on the remote server the actual days (ie 1,2,3 .. 30) are displayed under the wrong days in the week (ie Mon, Tue ... Sun) for example 19/07/2007 appears under Saturday not Thursday. I have tested this using IE and Opera same thing occurs.
I hope this makes sense but if not take a look and see -
http://www.busybee.es/demo/date_picker/examples/example.php
Any ideas what I have done wrong and how I can fix it.
Many Thanks
Mark
August 11, 2007 11:16 PM
Just downloaded vers 1.0.5...
Great work... I was looking at 1.0.1 before and needed selectable dates which is included here.
But it did not work....
In class.datepicker.php at line 313 it reads ...selectedYearsRange but it should be ... selectedDatesRange.
After the change everything is fine,except for minor spelling in french.php
August 20, 2007 10:25 AM
Hi Stefan,
I'm having the same problem. The month didn't change when I clicked the arrows. Is there any update about this issue? Thanks.
August 20, 2007 10:27 AM
Hi Stefan,
I'm having the same problem. When I clicked the arrows, the month didn't change. Is there any update about this issue? Thanks.
October 11, 2007 10:02 PM
Clicking the month/year reloads the page but doesn't select clicked month.
Using firefox.
Is there an update?
October 14, 2007 8:49 PM
Same problem as david here... Unable to select a month/year other than current.
October 27, 2007 8:39 PM
I can't change the date either... I'm hoping for an update. It's a master script! I can't change the month or year, when I work with Firefox or Internet Explorer, I always get the current month / year...
October 28, 2007 1:11 AM
To everybody who has the problem with the months not changing - I think I already gave this answer somewhere but here's again: this happens because, apparently you don't have in the $_SERVER superglobal the SCRIPT_NAME index. Therefore, in the "template.xtpl" file, where it says action="{PHP._SERVER.SCRIPT_NAME}" change it to action="{PHP._SERVER.PHP_SELF}". If that still doesn't work you could hard-code the actual path. Or, you could print_r($_SERVER) somewhere in your script and see what entries you have available and what can you use as a replacement for SCRIPT_NAME/PHP_SELF. Hope this helps!
December 18, 2007 10:47 PM
I was wondering on your calss if I can black out say for example, all Wednesdays and Saturdays? I want to be able to block out specific days. Can this be done? If so, how? Thanks in advance and this class rocks.
March 24, 2008 4:30 AM
Thanks Stefan ... just tried looking at this little script, however, found a "bug" ...
I have a more "strict" setup running, and the onclick in the example uses shortened PHP, instead of full the full PHP escape tag.
See here about not using the "short tags" for public use.
Just a minor nit ... other than that, this script works great.
April 04, 2008 7:11 PM
I solved the datepicker navigation problem with action empty (action="{PHP._SERVER.SCRIPT_NAME}")
activating (On) register_long_array variable in php.ini file.
Hope this help.
Guillermo Gomez Valcarcel
Madrid, Spain
April 04, 2008 7:27 PM
I solved the datepicker empty action action="{PHP._SERVER.SCRIPT_NAME}" activating (On) register_long_arrays in php.ini.
Hope this help.
Guillermo Gomez Valcarcel
Madrid, Spain.
July 25, 2008 5:56 PM
Sir,
Is there documentation explaining how to implement this script on a simple PHP page?
In other words...where do I put all the stuff from your zip file on my computer?
September 02, 2008 9:11 AM
Stefan,
First of all thanks so much for Your Date Picker Class.
I however have one problem, the class works perfect in Internet Explorer, but when I use Mozilla Firefox Browser the time is not loaded even when I select it. It just loads the date and then time defaults to OO:OO . What could the problem be?
September 02, 2008 9:11 AM
Stefan,
First of all thanks so much for Your Date Picker Class.
I however have one problem, the class works perfect in Internet Explorer, but when I use Mozilla Firefox Browser the time is not loaded even when I select it. It just loads the date and then time defaults to OO:OO . What could the problem be?
September 16, 2008 10:21 AM
I am new to PHP but am hoping to deploy a website using Joomla and the date picker might just make it possible as selecting and capturing dates is fundamental.
I have got the date picker working except that when I try to write the value back to the database the field is blank.
$dp->show("date") does enter the date into the text box but when I test for a value it is always blank.
Class class - thanks.