PHP Classes

File: site/demos/form-dates.php

Recommend this page to a friend!
  Packages of Boss Ibrahim Mussa   Caelrik   site/demos/form-dates.php   Download  
File: site/demos/form-dates.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Caelrik
Build Web user interface from PHP components
Author: By
Last change:
Date: 8 days ago
Size: 539 bytes
 

 

Contents

Class file image Download
<?php

use Caelrik\Ui\Components\Form;
use Caelrik\Ui\Components\Form\Field;

return Form::make('booking')
    ->action('/bookings')
    ->add(
        Field::dateRange('stay')
            ->labels('Arrival', 'Departure')
            ->min('2026-01-01')
            ->required()
            ->help('The departure can be the arrival day.'),
        Field::time('check_in', 'Check-in time')->min('14:00')->max('22:00')->step(900)->value('15:00'),
        Field::dateRange('meeting', 'Meeting', 'datetime-local'),
    )
    ->submit('Book');