> To build a Wix site agentically, or add Wix features like bookings or a store to a site you already have, follow https://www.wix.com/headless/skill.md
> 
> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

## Resource: CalendarPanelFooter Component

## Article: CalendarPanelFooter Component

## Article Link: https://dev.wix.com/docs/wix-design-system/components/form/calendar/calendar-panel-footer-component.md

## Article Content:

# CalendarPanelFooter

_Components/Form/Calendar/CalendarPanelFooter_

Interactive docs page: <https://wix-pages.com/design-system-documentation/#/component/calendarpanelfooter>

## Overview

```jsx
<CalendarPanelFooter
  primaryActionLabel="Apply"
  secondaryActionLabel="Cancel"
  selectedDays={{
    from: new Date(Date.now() - 7 * 1000 * 60 * 60 * 24),
    to: new Date(),
  }}
  dateToString={(date) => date.toLocaleDateString('en-US')}
/>;
```

Calendar panel footer is an internal component that is designed to layout submit actions for a date selector. It is used as a part of the `<CalendarPanel/>` component.

### Do

- Use it as a fundamental part of `<CalendarPanel/>` to display submit actions and selected date

### Don't

- Don't use it as a standalone component. Use it inside of `<CalendarPanel/>` only.

### Feature examples

#### Actions

Define labels for main actions with \`primaryActionLabel\` and \`secondaryActionLabel\` props. Both submit and discard actions are mandatory and cannot be removed.

```jsx
<CalendarPanelFooter
  primaryActionLabel="Apply"
  secondaryActionLabel="Cancel"
/>;
```

#### Disabled Action

Disable primary action interactions with \`primaryActionDisabled\` prop. Use it to restrict users from submitting invalid selections.

```jsx
<CalendarPanelFooter
  primaryActionDisabled
  primaryActionLabel="Apply"
  secondaryActionLabel="Cancel"
/>;
```

#### Selected Days

Display a selected date or a date range using \`selectedDays\` prop. Use it to inform users about active selection before submission.

```jsx
<StorybookComponents.Stack flexDirection="column">
  <CalendarPanelFooter
    primaryActionLabel="Apply"
    secondaryActionLabel="Cancel"
    dateToString={(date) => date.toLocaleDateString('en-US')}
    selectedDays={new Date()}
  />
  <CalendarPanelFooter
    primaryActionLabel="Apply"
    secondaryActionLabel="Cancel"
    dateToString={(date) => date.toLocaleDateString('en-US')}
    selectedDays={{
      from: new Date(),
      to: new Date(Date.now() + 7 * 1000 * 60 * 60 * 24),
    }}
  />
</StorybookComponents.Stack>;
```

### Common use case examples

#### Calendar Panel

Use calendar panel footer as a fundamental part of `<CalendarPanel/>` that requires user confirmation in order to submit and save a selection.

```jsx
() => {
  const [selectedValue, setSelectedValue] = React.useState(new Date());
  const today = new Date();

  const getDateDaysAgo = (days) =>
    new Date(Date.now() - days * 1000 * 60 * 60 * 24);

  const presets = [
    {
      id: 0,
      selectedDays: getDateDaysAgo(1),
      value: 'Yesterday',
    },
    {
      id: 1,
      selectedDays: today,
      value: 'Today',
    },
    {
      id: 2,
      selectedDays: {
        from: getDateDaysAgo(7),
        to: today,
      },
      value: 'Last 7 Days',
    },
    {
      id: 3,
      selectedDays: {
        from: getDateDaysAgo(30),
        to: today,
      },
      value: 'Last 30 Days',
    },
    {
      id: 4,
      selectedDays: {
        from: getDateDaysAgo(90),
        to: today,
      },
      value: 'Last 90 Days',
    },
  ];
  return (
    <CalendarPanel
      presets={presets}
      onChange={(value) => setSelectedValue(value)}
      value={selectedValue}
      footer={() => (
        <CalendarPanelFooter
          primaryActionLabel="Submit"
          secondaryActionLabel="Cancel"
          selectedDays={selectedValue}
          dateToString={(date) => date.toLocaleDateString('en-US')}
        />
      )}
      autoFocus={false}
    />
  );
};
```

## Code

```jsx
import { CalendarPanelFooter } from '@wix/design-system';
```

### Props

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| `dataHook` | `string` | — | Applies a data-hook HTML attribute that can be used in the tests. |
| `dateToString` | `(date: Date) => string` | `date => new Date(date).toLocaleDateString()` | Formats date into a string for displaying the current selected days. Receives a Date instance. |
| `primaryActionDisabled` | `boolean` | — | Specifies whether primary action is disabled. |
| `primaryActionLabel` *(required)* | `string` | — | Defines primary (submit) action label. |
| `primaryActionOnClick` | `MouseEventHandler` | — | Defines a callback function which is called every time primary button is clicked. |
| `secondaryActionLabel` *(required)* | `string` | — | Defines secondary (cancel) action label. |
| `secondaryActionOnClick` | `MouseEventHandler` | — | Defines a callback function which is called every time secondary button is clicked. |
| `selectedDays` | `string \| Date \| DateRangeType` | — | Defines an active date or a date range selection. |

## Testkit

Import the driver matching your test environment:

```jsx
// UniDriver
import { CalendarPanelFooterUniDriver } from '@wix/design-system/dist/testkit/unidriver';

// Vanilla
import { CalendarPanelFooterTestkit } from '@wix/design-system/dist/testkit';

// Puppeteer
import { CalendarPanelFooterTestkit } from '@wix/design-system/dist/testkit/puppeteer';

// Testing Library
import { CalendarPanelFooterTestkit } from '@wix/design-system/dist/testkit/testing-library';
```

### Driver methods

| Method | Description |
| --- | --- |
| `isPrimaryButtonDisabled` | — |
| `getSelectedDaysText` | — |
| `getPrimaryActionButtonLabel` | — |
| `getSecondaryActionButtonLabel` | — |
| `clickOnPrimaryButton` | — |
| `clickOnSecondaryButton` | — |
| `exists` | Checks whether the component found with the given data hook. |
| `element` | Gets the component root element. |
| `click` | Clicks on the component root element. |
| `base` | Returns UniDriver for the base element. |

## Changelog

- **1.344.0** (2026-10-28) — maintenance release, no component-specific changes
- **1.339.0** (2026-10-19) — maintenance release, no component-specific changes
- **1.338.0** (2026-10-15) — maintenance release, no component-specific changes
- **1.330.0** (2026-09-28) — maintenance release, no component-specific changes
- **1.325.0** (2026-09-17) — maintenance release, no component-specific changes
- **1.324.0** (2026-09-14) — maintenance release, no component-specific changes
- **1.310.0** (2026-08-10) — maintenance release, no component-specific changes
- **1.298.0** (2026-07-14) — maintenance release, no component-specific changes
- **1.292.0** (2026-06-22) — maintenance release, no component-specific changes
- **1.291.0** (2026-06-19) — maintenance release, no component-specific changes
- **1.289.0** (2026-06-17) — maintenance release, no component-specific changes
- **1.272.0** (2026-04-27) — maintenance release, no component-specific changes
- **1.271.0** (2026-04-22) — maintenance release, no component-specific changes
- **1.265.0** (2026-04-02) — maintenance release, no component-specific changes
- **1.260.0** (2026-03-17) — maintenance release, no component-specific changes
- **1.92.1** (2024-02-05) — maintenance release, no component-specific changes