> ## Documentation Index
> Fetch the complete documentation index at: https://docs.devdeia.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Usage

> Form field, table column, and infolist entry, with every customization option.

## Form field

```php theme={null}
use Andreia\FilamentRecurrence\Forms\Components\RecurrenceField;

public static function form(Form $form): Form
{
    return $form
        ->schema([
            TextInput::make('title')->required(),

            RecurrenceField::make('recurrence')
                ->showStartDate()
                ->showEndOptions()
                ->useDateTime(), // Use DateTimePicker instead of DatePicker
        ]);
}
```

### Form field options

| Method                                     | Effect                                                                                                                                                                                     |
| ------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `->showStartDate(bool $show = true)`       | Show/hide the start date picker                                                                                                                                                            |
| `->showEndOptions(bool $show = true)`      | Show/hide end options (never, until, count)                                                                                                                                                |
| `->showPreview(bool $show = true)`         | Show/hide the live preview (human-readable rule + next occurrences). Default `true`                                                                                                        |
| `->previewOccurrencesLimit(int $limit)`    | How many "next occurrences" rows appear in the preview. Default `5`                                                                                                                        |
| `->useDateTime(bool $use = true)`          | Use a datetime picker instead of a date picker                                                                                                                                             |
| `->showTimezone(bool $show = true)`        | Show/hide the per-record timezone select. Default `true` — when `false`, the config timezone is always used                                                                                |
| `->showAdvancedOptions(bool $show = true)` | Show advanced recurrence options                                                                                                                                                           |
| `->nullable(array $fields = null)`         | Allow start date, frequency, and timezone to be empty (empty recurrence is stored as `null`). Pass `fields` to make only specific fields nullable, e.g. `->nullable(fields: ['timezone'])` |

```php theme={null}
// Hide the preview (full-width form only)
RecurrenceField::make('recurrence')->showPreview(false);

// Use only config('filament-recurrence.timezone') for every record (hide the timezone field)
RecurrenceField::make('recurrence')->showTimezone(false);

// Show 10 upcoming dates in the preview
RecurrenceField::make('recurrence')->previewOccurrencesLimit(10);
```

<Note>
  When the start date is empty (with `nullable()` in effect), "Repeat every" stays disabled until a start date is set.
</Note>

## Table column

```php theme={null}
use Andreia\FilamentRecurrence\Tables\Columns\RecurrenceColumn;

public static function table(Table $table): Table
{
    return $table
        ->columns([
            TextColumn::make('title'),

            RecurrenceColumn::make('recurrence')
                ->showNextOccurrences(limit: 3)
                ->showRule(),
        ]);
}
```

| Method                                                     | Effect                      |
| ---------------------------------------------------------- | --------------------------- |
| `->showRule(bool $show = true)`                            | Display the RRULE string    |
| `->showNextOccurrences(bool $show = true, int $limit = 5)` | Show the next N occurrences |

## Infolist entry

```php theme={null}
use Andreia\FilamentRecurrence\Infolists\Components\RecurrenceEntry;

public static function infolist(Infolist $infolist): Infolist
{
    return $infolist
        ->schema([
            TextEntry::make('title'),

            RecurrenceEntry::make('recurrence')
                ->showAllDetails()
                ->showNextOccurrences(limit: 10)
                ->showRule(),
        ]);
}
```

| Method                                                      | Effect                      |
| ----------------------------------------------------------- | --------------------------- |
| `->showRule(bool $show = true)`                             | Display the RRULE string    |
| `->showAllDetails(bool $show = true)`                       | Show all recurrence details |
| `->showNextOccurrences(bool $show = true, int $limit = 20)` | Show the next N occurrences |

See [Recurrence Patterns](/filament/recurrence/recurrence-patterns) for the `RecurrenceData` DTO and example rules for every frequency.
