This package adds a basic HTML5 time field to Laravel Nova.
Use composer to install the package.
composer require michielfb/laravel-nova-time-field
The display format of the Time
field can be customized using the format
method.
The format must be a format supported by Moment.js
.
<?php
use Michielfb\Time\Time;
Time::make('Time')->format('HH:mm');
The step attribute
can be configured by using the withSteps
method.
<?php
use Michielfb\Time\Time;
Time::make('Time')->withSteps(1);
The withSeconds
method sets a step of 1 which allows users to enter seconds.
<?php
use Michielfb\Time\Time;
Time::make('Time')->withSeconds();