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

# Allowed Expiration Formats

For a single input element, the expiration date can be an input element or a pair of drop down elements on your checkout page.

When passing in format using the setup() method, as shown in this example

```

  expirationDate: {
  selector: "#vin_PaymentMethod_creditCard_expirationDate",
  placeholder: "Expiration Date MM/YY", // optional field
  format: "MM/YY" // optional, default is MM/YY 
  },
```

only the following month and year formats are allowed:

`"MM/YY"`

`"MM-YY"`

`"MMYY"`

`"YY/MM"`

`"YY-MM"`

`"YYMM"`

`"YYYY/MM"`

`"YYYY-MM"`

`"YYYYMM"`

`"MM/YYYY"`

`"MM-YYYY"`

`"MMYYYY"`

The default format is `MM/YY`. Any other format will generate a browser error.

If you prefer drop down boxes for month and year instead of a text input box, use the following setup sub objects:

```
expirationMonth: { // optional dropdown field or use expirationDate
  selector: "#vin_PaymentMethod_creditCard_expirationDate_month",
 language: "fr", // en, es, de, pt, fr, zh, ja only allowed
  format: "N - A" // "N", "A", "N A", "N-A", "N - A" where (N=numeric month, A=Alphabetic Month)
  },
```

The language element is optional and can be only the above language codes (`“en”` for English, `“es”` for Spanish, `“de”` for German, and so on.

The following elements are allowed:

`"N"`

`"A"`

`"N A"`

`"N-A"`

`"N - A"`

where `N` refers to a numeric value for month, and `A` refers to an alphabetical value for month.

Options for year include YY and YYYY.

```
expirationYear: { // optional dropdown field or use expirationDate
  selector: "#vin_PaymentMethod_creditCard_expirationDate_year",
 language: "fr", // en, es, de, pt, fr, zh, ja only allowed
  format: "YY" // defaults to YYYY 
  },
```

If you prefer input boxes instead of drop-down boxes, use the following:

```
expirationMonthInput: {
  selector: "#vin_PaymentMethod_creditCard_expirationDate_month",
  placeholder: 'Month',
  format: "MM" // only "MM" is supported
  },
```

```
expirationYearInput: {
  selector: "#vin_PaymentMethod_creditCard_expirationDate_year",
  placeholder: 'Year',
  format: "YYYY" // "YY" or "YYYY", defaults to YYYY
  },
```

**Parent topic:**[Implementing HOA with Hosted Fields](../topics/Implementing_HOA_with_Ho)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.