Skip to content

Date

Class: Code16\Sharp\Form\Fields\SharpFormDateField

Configuration

setHasDate

Let the user enter a date (default is true).

setHasTime

Let the user enter a time (default is false).

setMondayFirst

Put monday as the first day in the calendar (default: false).

setSundayFirst

Put sunday as the first day in the calendar (default: true).

setMinTime

setMaxTime

If set, the time-chooser will be constraint as defined.

setStepTime

Set a time step (in minutes) for the time-chooser. Default is 30.

Formatter

  • toFront: accept either a Carbon instance, a DateTime instance of a "Y-m-d H:i:s" string.
  • fromFront: return a "Y-m-d H:i:s" string.

Released under the MIT License.