Basic Usage
Attributes
The name attribute for the input field.
The label text displayed above the input. If empty, a label will be auto-generated from the name.
The Eloquent model instance to bind the input to. When provided, the component will automatically populate the value from the model.
Default value for the input when no model or old value exists.
Custom icon class for the clock icon. Defaults to framework-configured icon:
- Bootstrap 5:
fa-regular fa-clock - Material Admin 26:
zmdi zmdi-clock
Custom icon class for the clear button. Defaults to framework-configured icon:
- Bootstrap 5:
fa-regular fa-close - Material Admin 26:
zmdi zmdi-close
Custom CSS classes for the clear button. Defaults to framework-configured classes:
- Bootstrap 5:
btn btn-outline-secondary btn-date-clear disable-w-input - Material Admin 26:
text-body btn-date-clear disable-w-input
CSS classes for the icon wrapper element. Defaults to
date-icon-wrapper.Display validation errors below the input.
Show or hide the label element.
Placeholder text for the input. Auto-generated from label if
showPlaceholder is true.Automatically generate placeholder from label.
Mark the field as required with an asterisk in the label.
Render the input in horizontal/inline layout.
Use Bootstrap floating label style.
Custom CSS classes for inline label. Defaults to framework configuration.
Custom CSS classes for inline input wrapper. Defaults to framework configuration.
Enable JavaScript validation error display.
Override the default CSS framework. Options:
bootstrap-5, material-admin-26.Examples
Basic Time Input
With Model Binding
With Custom Icons
Inline Layout
Floating Label
With Placeholder
With Default Value
Office Hours Example
With Additional Attributes
Configuration
The Time component uses configuration fromconfig/forms.php:
Framework Icon Settings
Implementation Details
The Time component:- Renders with the
time-pickerCSS class for JavaScript initialization - Displays a clock icon in an input group prepend
- Includes a clear button to reset the time value
- Extends the Date component with
type="time"hardcoded - Uses the time-specific icon from framework configuration
- Shares all base functionality with the Date component
src/Views/Components/Time.php:5
View: resources/views/bootstrap-5/input.blade.php:6