| Re: Problem with XoopsFormDateTime |
| by Catzwolf on 2007/10/15 15:05:15 Quote:
This was using the default english language and I would have to state it does seem like a bug but I have not fould the reason behind yet. |
| Re: Problem with XoopsFormDateTime |
| by earplane on 2007/10/15 12:17:22 What language are you using? I had a problem with the popup calendar not showing in Norwegian, but it worked OK in English. It turned out that the JSCalendar had a faulty language file. Try changing your site language, it may not be a XOOPS bug at all
|
| Re: Problem with XoopsFormDateTime |
| by Catzwolf on 2007/10/15 10:02:52 Quote:
Try using 'XoopsFormTextDateSelect' rather than 'XoopsFormDateTime' at the moment, there seems to be an issue somewhere when rendering the form via smarty, it seems ok if you do it the other way. Working method but not with smarty: le="color: #000000"><?php include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; $edit_form = new XoopsThemeForm( "Edit", "edit_form", "edit.php" ); $descrizione = new XoopsFormTextArea( "Descrizione", "descrizione", $eo_descr, 10, 100, "desc" ); $edit_form->addElement( $descrizione, true ); $data = new XoopsFormDateTime( "Data", "data", 15, 0/*$eo_ins_date*/ ); $edit_form->addElement( $data, false ); $note = new XoopsFormTextArea( "Note", "note", $eo_note, 10, 100, "note" ); $edit_form->addElement( $note, true ); $edit_form->addElement( new XoopsFormHidden( 'id', $id ) ); $button_tray = new XoopsFormElementTray( ' ' , ' ', 'button' ); $button_tray->addElement( new XoopsFormButton( '', 'post', "Modifica", 'submit' ) ); $edit_form->addElement( $button_tray ); $edit_form->display(); You could buffer the output and at it to a smarty tag example: le="color: #000000"><?php ob_start(); include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; $edit_form = new XoopsThemeForm( "Edit", "edit_form", "edit.php" ); $descrizione = new XoopsFormTextArea( "Descrizione", "descrizione", $eo_descr, 10, 100, "desc" ); $edit_form->addElement( $descrizione, true ); $data = new XoopsFormDateTime( "Data", "data", 15, 0/*$eo_ins_date*/ ); $edit_form->addElement( $data, false ); $note = new XoopsFormTextArea( "Note", "note", $eo_note, 10, 100, "note" ); $edit_form->addElement( $note, true ); $edit_form->addElement( new XoopsFormHidden( 'id', $id ) ); $button_tray = new XoopsFormElementTray( ' ' , ' ', 'button' ); $button_tray->addElement( new XoopsFormButton( '', 'post', "Modifica", 'submit' ) ); $edit_form->addElement( $button_tray ); $edit_form->display(); $output = ob_get_contents(); ob_end_clean(); $xoopsTpl->assign( 'form', $output ); Or you could do it this way: le="color: #000000"><?php include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; $edit_form = new XoopsThemeForm( "Edit", "edit_form", "edit.php" ); $descrizione = new XoopsFormTextArea( "Descrizione", "descrizione", $eo_descr, 10, 100, "desc" ); $edit_form->addElement( $descrizione, true ); $data = new XoopsFormDateTime( "Data", "data", 15, 0 ); $edit_form->addElement( $data, false ); $note = new XoopsFormTextArea( "Note", "note", $eo_note, 10, 100, "note" ); $edit_form->addElement( $note, true ); $edit_form->addElement( new XoopsFormHidden( 'id', $id ) ); $button_tray = new XoopsFormElementTray( ' ' , ' ', 'button' ); $button_tray->addElement( new XoopsFormButton( '', 'post', "Modifica", 'submit' ) ); $edit_form->addElement( $button_tray ); $edit_form->assign( $xoopsTpl ); Remember When working with XoopsFormDateTime it returns an Array with two elements. The first element requires some work to be usable. $array['date'] and $array['time] $array['time'] will have to be converted to unixtime format and time added to it i.e: $date = strtotime($array['date']) + $array['time]; I will try and find out the reason why the first method does not work as it should. Catz Hope this helps. |
| Re: Problem with XoopsFormDateTime |
| by lesage on 2007/10/15 3:05:22 i have the same problem with XoopsFormDateTime i can'T get the enter or selected date. Please when you find some answer let me know. |
| Re: Problem with XoopsFormDateTime |
| by earplane on 2007/4/28 17:57:06 What language are you using? I used to have problems with the popup calendar not showing, and I traced it down to a faulty language file. But if you're using English that's probably not it. If you're using a non-English language you may want to try if it works with XOOPS set to English. |