michielfb/laravel-nova-time-field

A Laravel Nova field.

1.2.1 2021-04-02 19:24 UTC

This package is auto-updated.

Last update: 2021-08-02 20:19:16 UTC


README

This package adds a basic HTML5 time field to Laravel Nova.

Installation

Use composer to install the package.

composer require michielfb/laravel-nova-time-field

Usage

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');

Steps

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();