PHP code example of ptplugins / filament-pikaday

1. Go to this page and download the library: Download ptplugins/filament-pikaday library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

ptplugins / filament-pikaday example snippets


use PtPlugins\FilamentPikaday\Fields\PikadayDatePicker;

PikadayDatePicker::make('published_at')
    ->label('Published at')
    ->minDate('2020-01-01')
    ->maxDate(now())
    ->firstDayOfWeek(1)          // 1 = Monday (default), 0 = Sunday
    ->displayFormat('DD/MM/YYYY');

PikadayDatePicker::make('published_at')
    ->displayFormat('DD/MM/YYYY')   // user sees 15/06/2026
    ->locale('hr');                 // calendar in Croatian
// → model / database always stores "2026-06-15"

PikadayDatePicker::make('starts_on')
    ->locale('hr');   // Croatian month/weekday names

PikadayDatePicker::make('starts_on')
    ->i18n([
        'previousMonth' => 'Prethodni',
        'nextMonth'     => 'Sledeći',
    ]);
bash
php artisan vendor:publish --tag=filament-pikaday-translations