Resolved - Datetime Helper Questions

Permalink
Hi All,

im trying to use the date time helper form on a custom package, the problem is that for some reason is not translating anything, im using it this way;

where the form is;
$dt->datetime('fieldname', '12:00 AM', true, true)


before i insert to database:
$datetimevalue = $dt->translate($_POST['fieldname']);
// insert $datetimevalue into the db


i get a 0 if i print the translate.

any help is appreciated.

mdzoidberg
 
ryan replied on at Permalink Reply
ryan
Just use 'fieldname', not $_POST['fieldname']

$dattime = $dt->translate('fieldname');
echo var_dump($datetime)


it uses that key to look at the post array for:

$_POST['fieldname_date']
$_POST['fieldname_time']

those aren't the correct post vars, but that's the idea.
mdzoidberg replied on at Permalink Reply
mdzoidberg
Thanks Ryan, that was it, working to perfection now.