Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Nova Datepicker Field Laravel Package

adtention/nova-datepicker-field

A date picker field for Laravel Nova that adds an interactive calendar input to your resources. Drop it into your Nova resource definitions to replace the default date field with a cleaner picker UI for selecting dates in admin forms. Ideal for quick date entry in Nova admin panels.

View on GitHub
Deep Wiki
Context7

Getting Started

Start by installing the package with Composer and confirming it is available to your Laravel Nova application:

composer require adtention/nova-datepicker-field

Look first at the package README and the 1.3.0 PR for the new Shift shortcut. The key thing to verify is which field configuration enables multi-date selection, because the 1.3.0 feature applies when selecting or deselecting a range of dates between a start and end date.

A good first use case is a Nova resource where admins manage multiple dates, such as availability, blackout dates, scheduled closures, or batch event dates. Add the datepicker field to the resource, enable multi-date selection as documented by the package, and test this workflow:

  1. Open the Nova create/edit form.
  2. Select a start date.
  3. Hold Shift and click an end date.
  4. Confirm all dates between them are selected.
  5. Repeat with Shift to deselect the range.

1.3.0 is a minor feature release. The release notes do not indicate breaking changes, migrations, or config changes.

Implementation Patterns

Use the field as a normal Nova form field, but treat multi-date values as structured data rather than a single scalar date. A typical pattern is:

use Adtention\NovaDatepickerField\NovaDatepickerField;

NovaDatepickerField::make('Dates')
    ->rules(['array'])
    ->rules(['dates.*' => ['date']]),

The exact class name and configuration methods should follow the package README. The important implementation pattern is to pair the picker with array validation and an Eloquent cast:

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

For day-to-day admin workflows, the Shift shortcut is most useful when users need to apply a contiguous range quickly:

  • Blackout date management: select a holiday period in one gesture.
  • Availability calendars: deselect a week or month range.
  • Batch scheduling: select consecutive event dates without clicking each day.
  • Operational closures: choose a start and end date, then submit the selected dates as a batch.

Keep date selection UI and server-side validation aligned. The frontend Shift behavior only changes what is selected in the browser; your Laravel validation and persistence rules still need to reject invalid, missing, or unexpected dates.

For testing, cover both paths:

  • A Nova form test or request test that submits an array of dates and asserts persistence.
  • A browser-level or manual test that confirms Shift-click selects and deselects the intended range, especially if your admin users rely on this workflow.

When upgrading, run composer update adtention/nova-datepicker-field, clear Nova’s compiled assets/caches if your deployment requires it, and smoke-test the multi-date picker in the Nova UI. No data migration is implied by 1.3.0.

Gotchas and Tips

  • The Shift shortcut is a client-side convenience. Do not rely on it for validation or business rules; validate the submitted date array on the server.
  • Confirm the field is configured for multiple dates. Shift range selection is unlikely to be meaningful on a single-date picker.
  • Test selection and deselection separately. The release notes explicitly mention both selecting and deselecting dates between start and end dates.
  • Check behavior around disabled, unavailable, or out-of-range dates. If your picker disables certain days, verify whether Shift selection respects those constraints.
  • Document the shortcut for Nova users. Shift-click is not always discoverable, so add a short admin note or tooltip if your workflow depends on it.
  • Watch array casting and validation. Multi-date fields should be cast to array or json and validated with dates.* rules.
  • Be careful with timezones and date formatting. Store dates consistently and format them for display according to your Nova/user timezone expectations.
  • If the UI does not reflect the update after upgrading, clear Nova assets and application caches, then retest in a fresh browser session.
  • Use browser dev tools to inspect the submitted payload if range selection appears incorrect. Confirm the field sends an array of selected dates rather than a formatted string.
  • Treat this as a low-risk minor upgrade, but still smoke-test your existing datepicker fields. The new contributor PR adds behavior in the picker UI, so regression risk is mainly around multi-date selection interactions.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect