Skip to content
This repository was archived by the owner on Dec 29, 2021. It is now read-only.

Form DateField

Luca Longo edited this page Aug 18, 2020 · 6 revisions

Render an input field that allow date values using Flatpickr.

Properties

name type default value description
id ?string null Field ID (autogenerated if empty)
name ?string null Field name
label ?string null Label visible on the form
errorBag ?string null Error field returned from the bag
disabled bool false Determs if the field is disable (or not)
readOnly bool false Determs if the field is read-only (or not)
value mixed null Field value
placeholder ?string null Field placeholder
valueFormat ?string null Input form value
displayFormat ?string null Alternative value shown to the UI
mode ?string null Determs if the calendar will works as single value (default), range or multiple values.

Usage

<x-bc-form:date-field label="Date field" error-bag="dateField" value-format="Y-m-D" display-format="d/m/Y" />

or, if you use Laravel Livewire:

<x-bc-form:money-field label="Date field" error-bag="dateField" value-format="Y-m-D" display-format="d/m/Y" wire:model.lazy="moneyField" />

Scopes

  • prepend
  • append

Example:

<x-bc-form:money-field>
    <x-slot name="prepend">Prepend</x-slot>
    <x-slot name="append">Append</x-slot>
</x-bc-form:money-field>

Clone this wiki locally