function_bit_select_datetime
Created by: hiran, Last modification: Sun 14 of Jan, 2007 (10:33 UTC)
This function generates HTML code that adds a date picker to an HTML form. Depending on Bitweaver settings (Administration/Themes/Theme Settings) this can be the ordinary Smarty way of date/time picking (see html_select_date and html_select_time functions) or a nice javascript calendar.
Later, in the PHP file processing that form's request, use this to evaluate the setting:
Parameters
| name | The name of the inputfield. Use this to identify the date/datetime input from other inputs. (will be used for <input name="...), defaults to 'date'. |
| showtime | defines whether you need a date or datetime picking method. Set to 'true' or 'false', defaults to 'true'. |
| time | The time value to be displayed, in the format given in the format parameter. Defaults to the current system time. |
| format | The datetime format used to display/return the timestamp. Defaults to the user's preference on the Bitweaver system. |
Sample
<div class="row"> {formlabel label="End" for="end"} {forminput}{bit_select_datetime name='event[end]' time=$gContent->mInfo.end}{/forminput} </div>
Later, in the PHP file processing that form's request, use this to evaluate the setting:
$timestamp = $gBitSystem->mServerTimestamp->getUTCFromDisplayDate(_REQUEST['event']['end']);
See also
- function_html_select_date
- function_html_select_time
- function_jscalendar
- function_showDate
- Smarty Functions
Related Items
Documentation » Technical Documentation » Smarty Functions
a list of custom smarty functions that are used and maintained by bitweaver
block.bitmodule • block_box • block_form • block_forminput • block_jstabs • block_legend • function_biticon • function_bit_select_datetime • function_formlabel • function_libertypagination • function_pagination • function_smartlink • function_var_dump • Smarty Functions
Comments