New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

sadekd/nova-opening-hours-field

Laravel Nova custom field for Spatie Opening Hours
368,249 38
Install
composer require sadekd/nova-opening-hours-field
Latest Version:v4.0.0
PHP:^8.1
License:MIT
Last Updated:Jan 20, 2025
Links: GitHub  ·  Packagist
Maintainer: sadekd

Nova Opening Hours Field

Latest Stable Version Total Downloads License PHP Version Require

Laravel Nova custom field for Spatie Opening Hours

Index

Screenshot Index

Form

Screenshot Form

Detail

Screenshot Detail

Installation

You can install the package in to a Laravel app that uses Nova via composer:

composer require sadekd/nova-opening-hours-field

Usage

Laravel Migration

$table->json('opening_hours');  // can be ->nullable()

Laravel Model

protected $casts = [
    'opening_hours' => 'array',
];

Nova Resource

NovaOpeningHoursField::make(__('Opening Hours'), 'opening_hours'),
// ->allowExceptions(FALSE)    // TRUE by default
// ->allowOverflowMidnight(TRUE)  // FALSE by default
// ->useTextInputs(TRUE)  // FALSE by default

Known issues

  • Lazy validation on time field - losing focus when live(help needed)
  • Editing date in exceptions causes row jumping - key from date(help needed)
  • Browser time input does not support 24:00
  • Browser date input does not support recurring format

TODO

  • Explode interval input => time fields
  • Validation
  • Localization
  • Exceptions
  • Tests

License

The MIT License (MIT). Please see License File for more information.

Related Packages

epartment/nova-dependency-container

A Laravel Nova field container allowing to depend on other fields values

4,703,233 378
eminiarts/nova-tabs

Laravel Nova - Tabs.

4,610,439 464
ebess/advanced-nova-media-library

Laravel Nova tools for managing the Spatie media library.

3,888,853 616
spatie/nova-tags-field

A tags field for Nova apps

2,356,168 301
kabbouchi/nova-impersonate

A Laravel Nova field allows you to authenticate as your users.

2,268,645 234

Version History

Version Released PHP License
v4.0.0 ^8.1 MIT
v3.0.7 ^7.2|^8.0 MIT
v3.0.6 ^7.2|^8.0 MIT
v3.0.5 ^7.2|^8.0 MIT
v3.0.4 ^7.2|^8.0 MIT