pragmarx/nova-boolean-datetime-field

A Laravel Nova Boolean DateTime field.

Package info

github.com/antonioribeiro/nova-boolean-datetime-field

pkg:composer/pragmarx/nova-boolean-datetime-field

Statistics

Installs: 28 548

Dependents: 0

Suggesters: 0

Stars: 21

Open Issues: 3

v1.0.0 2019-01-20 21:04 UTC

Requires

  • php: >=7.1.0

Requires (Dev)

None

Suggests

None

Provides

None

Conflicts

None

Replaces

None

MIT b95cf7e9a68482783e27890bc3f4acfb8685c18e

novalaravel

This package is auto-updated.

Last update: 2026-06-27 23:26:46 UTC


README

This package allows you to show set/unset states for your date fields as boolean view or badges.

This is how your boolean dates will render:

👁 Dashboard index page

Edit view will let you use the DatePicker as always

👁 Dashboard index page

Detail view will show badges and values

👁 Dashboard index page

Installation Instructions

Install via Composer:

$ composer require pragmarx/nova-boolean-datetime-field

No you just have to use it in your Resources:

use PragmaRX\BooleanDatetime\BooleanDatetime;

And here's some usage examples:

A normal dotted boolean

BooleanDatetime::make('Sent', 'sent_at'),

A badge datetime boolean

BooleanDateTime::make('Delivered', 'delivered_at')
 ->badge(),

Change colors

BooleanDateTime::make('Bounced', 'bounced_at')
 ->badge()
 ->colors('bg-danger text-white', 'bg-lighter text-black'),

Make a less important value a clear badge

BooleanDateTime::make('Opened', 'opened_at')
 ->badge()
 ->colors('bg-success text-white', 'bg-warning text-black'),

Change badge labels

BooleanDateTime::make('Clicked', 'clicked_at')
 ->badge('Done', 'Open'),

Hide it from index

BooleanDateTime::make('Clicked', 'clicked_at')
 ->badge()
 ->hideFromIndex(),