A new Quickform element: SmartDate
| From: | Mike | Date: | Wed, 21 Jan 2004 13:49:24 +0000 |
| Subject: | A new Quickform element: SmartDate | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-10271@lists.php.net to get a copy of this message | ||
Hi,
Not sure if this is the normal procedure for sharing something, attached
(unless its being stripped out) is a PHP script for a new Quickform element
I just cobbled together: called "SmartDate".
This is an alternative to the packaged 'date' element - this one doesn't use
any qf groups so should work better with rules when embedded in groups for
layout purposes.
Its not very configurable, currently, and only formats the date in
DD/MM/YYYY. Due to time constraints I cannot (yet) spend much time on it.
I'd love it if anybody else could expand on the new element and re-post
changes.
Its special features are:
Enter the date free hand dd/mm/yyyy.
Press '.' in the text box to insert todays date.
Use the '+' or '-' keys to increase/decrease the date by a day.
The element takes care of illegal dates like 30/02/2003.
Cheers,
--
Mike Carter
[Senior Developer]
Personal Medical Advisor Limited
T: 01925 758229 | F: 01925 758023 | W: www.personalmedicaladvisor.co.uk