SproutCMS

This is the code documentation for the SproutCMS project

function datetimerangepicker()

Renders a datetime range picker

Output is in the form of two fields (given in name as a comma separated list) e.g.
$name = 'date_start,date_end' will result in two fields:
date_start => YYYY-MM-DD HH:MM:SS, date_end => YYYY-MM-DD HH:MM:SS

Usage

string Fb::datetimerangepicker ( string $name , array $attrs , array $options );

Arguments

  1. string $name
    The field name prefix
  2. array $attrs
    Attributes for the input element, e.g. ['class' => 'super-input', 'style' => 'font-style: italic']
  3. array $options
    Additional options:
        'min' Minimum datetime in YYYY-MM-DD HH:MM:SS format
        'max' Maximum datetime in YYYY-MM-DD HH:MM:SS format
        'incr' Time increment in minutes. Default 1
        'dir' Either "future" or "past", for the direction of the pre-configured ranges. Default "future"
        'dropdowns' => display the dropdown date selectors.

Return value

  • string
    The rendered HTML