Re: QuickForm Check Date

From: Date: Wed, 22 Dec 2004 08:05:49 +0000
Subject: Re: QuickForm Check Date
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-16401@lists.php.net to get a copy of this message
I search in the list and the only QUICKFORM checkdate function that i find don´t is functioning. Somebody have a solution for this?
function qf_date($date) {
    if ($date['m'] != '' && $date['d'] != '' && $date['Y'] != '') {
        return checkdate($date['m'], $date['d'], $date['Y']);
    }
    return false;
} Of course, you should replace the empty '' with whatever you choose for the emptyOptionText in your date element (or simply ignore it if you don't set addEmptyOption to true) Then you can do the usual registerRule and addRule -- Massimiliano Arione :: http://www.garak.it/ :: ** NO WORD http://www.gnu.org/philosophy/no-word-attachments.html ** ** NO HTML http://www.efn.no/html-bad.html **

« previous php.pear.general (#16401) next »