SproutCMS

This is the code documentation for the SproutCMS project

function simpledaterangepicker()

Renders simplified 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::simpledaterangepicker ( 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']
         'data-callback' => 'myCallBack' JS function name to be called upon dates updated
         Useage: myCallBack(date_from, date_to) { date_from = date_from.format('YYYY-M-D'); date_to = date_to.format('YYYY-M-D'); }
  3. array $options
    Customisation options
         'min' => the minimum of this date range.
         'max' => the maximum of this date range.

Return value

  • string
    The rendered HTML