SproutCMS

This is the code documentation for the SproutCMS project

function daterangepicker()

Renders a date 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, date_end => YYYY-MM-DD

Usage

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

Example

echo Fb::daterangepicker('date_from,date_to', [], ['min' => '2000-01-01']);

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
    Customisation options
         'min' => the minimum of this date range.
         'max' => the maximum of this date range.
         'dropdowns' => display the dropdown date selectors.
         'dir' => Either "future" or "past", for the direction of the pre-configured ranges. Default "future"

Return value

  • string
    The rendered HTML