date_form ()

function date_form ($prefix, $show_year = '', $show_month = '',
$show_date = '', $select = '', $yyrange = 6)

Use this function to create a selectable date form field. A date form field is a group of select form field consisting of three select fields: Date, Month & Year, where users can select a date using the form fields.

It's quite different than javascript based calendar, as it's aimed for faster user input.

$prefix = date form field id.

$show_year = if true, show year field, also fill the year field if $show_year > 1901 (optional).

$show_month = if true, show month field (optional).

$show_date = if true, show date field (optional).

$select = use 'YYYY-MM-DD' to fill the date field (optional).

$yyrange = no longer used.

To read this form field, use date_param () function.

Example 1

require './includes/user_init.php';

echo date_form ('date', 0, 0, 0);

Posted On: Aug-24-2010 @ 07:00am
Last Updated: Jan-01-1970 @ 07:00am

There is no comment. Why not be the first?

More Comments/Post Your Own