SproutCMS

This is the code documentation for the SproutCMS project

function datepicker()

Renders HTML containing a date selection UI. Output field value is in YYYY-MM-DD

Usage

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

Arguments

  1. string $name
    The field name
  2. array $attrs
    Attributes for the input element, e.g. ['id' => 'my-timepicker', class' => 'super-input', 'style' => 'font-style: italic']
  3. array $options
    Customisation options
         'min' => the earliest selectable date, format YYYY-MM-DD
         'max' => the latest selectable date, format YYYY-MM-DD
         'dropdowns' => bool, true to include dropdowns for the month and year

Exceptions thrown

Return value

  • string
    HTML