Repository navigation
Time
Viames Marino edited this page Feb 26, 2026
·
2 revisions
Pair\Html\FormControls\Time renders <input type="time"> with min/max helpers.
min(string|DateTime $minValue): selfmax(string|DateTime $maxValue): selfvalue(string|int|float|DateTime|null $value): staticrender(): string
- String values are stored as-is (typically
HH:MMorHH:MM:SS). -
value(DateTime ...)formats toH:i. - If
Env::get('UTC_DATE')is enabled and value isDateTime, timezone is converted to current user timezone.
$meeting = (new \Pair\Html\FormControls\Time('meetingTime'))
->min('09:00')
->max('18:00')
->value('10:30')
->required();
echo $meeting->render();Using DateTime:
$slot = (new \Pair\Html\FormControls\Time('slot'))
->value(new DateTime('2026-02-26 14:45:00'));For min() and max(), when passing a DateTime object, current implementation formats it as Y-m-d instead of H:i.
For predictable output, prefer passing string time values.
See also: Date, Datetime, FormControl.
Home · Setup · Configuration
Build with Pair 4
- Generator
- Controllers and responses
- Read models
- ActiveRecord and queries
- Forms and validation
- PairUI.js and HTML fragments
APIs and authentication
- API guide and CRUD
- Middleware and rate limits
- Users, sessions, and ACL
- Passkeys and social login
- Native mobile setup
Integrate and operate
- Integrations
- Runtime extensions and adapter keys
- Cache and cache stores
- Logs and observability
- PWA and push
- Packages and distribution
- Upgrade to v4