> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> 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: LocalDateTime

## Article: LocalDateTime

## Article Link: https://dev.wix.com/docs/site-extensions/editor-react-components/editor-react-types/reference/local-date-time.md

## Article Content:

import { Property, PropertyList, ExpandableSection } from "@wix/docs-ui/content";

# LocalDateTime

A date and time with no timezone, stored as a string. Use it for a field that sets a moment
on the calendar, such as when an event starts. The value is an ISO-8601 extended local
date-time, `YYYY-MM-DDThh:mm[:ss][.sss]`, for example `'2024-03-15T09:00'`.

## Component

In your component code, import the `LocalDateTime` type from `@wix/editor-react-types`:

```ts
import type { LocalDateTime } from '@wix/editor-react-types';
```

At runtime it's a plain string:

```ts
type LocalDateTime = string
```

### Usage

Your code either consumes a value of type `LocalDateTime` or produces one:

::::tabs
:::Consumers
In a component that receives a `LocalDateTime`, format it for display or parse it into a
`Date`:

```tsx
import type { LocalDateTime } from '@wix/editor-react-types';

function EventHeader({ eventStart }: { eventStart?: LocalDateTime }) {
  return <time dateTime={eventStart}>{eventStart}</time>;
}
```
:::
:::Producers
When your code produces a `LocalDateTime`, for a context or a function return, assign a
literal or derive one from a `Date` in local time:

```ts
import type { LocalDateTime } from '@wix/editor-react-types';

// A literal value.
const eventStart: LocalDateTime = '2024-03-15T09:00';

// Or derived from a Date, in local time.
const now = new Date();
const date = now.toLocaleDateString('en-CA');
const time = now.toLocaleTimeString('en-GB', { hour: '2-digit', minute: '2-digit' });
const currentDateTime: LocalDateTime = `${date}T${time}`;
```
:::
::::

## Manifest

In your manifest, declare the field with the `localDateTime` dataType:

```json
{ "dataType": "localDateTime" }
```

### Declaration

Declare a `localDateTime` field in one of these ways, depending on where the value comes from:

::::tabs
:::Data-property
Declare it as a data property when the Wix user should set the date and time in a panel. It
takes `dataType`, `displayName`, and an optional `defaultValue`:

```json
{
  "eventStart": {
    "dataType": "localDateTime",
    "displayName": "Event Start",
    "defaultValue": "2024-03-15T09:00"
  }
}
```
:::
:::Context-item
Declare it as a context item when your component supplies the date and time to descendant
components. It takes just `dataType` and `displayName`:

```json
{
  "eventStart": {
    "dataType": "localDateTime",
    "displayName": "Event Start"
  }
}
```
:::
:::Function-parameter-and-return
Declare it on a function when the function accepts or returns a date and time. It takes
`dataType` and an optional `displayName`, and a parameter may also set `optional`:

```json
{
  "parameters": [
    {
      "dataType": "localDateTime",
      "displayName": "Event Start"
    }
  ],
  "returns": {
    "dataType": "localDateTime"
  }
}
```
:::
::::