Create Card Expiry Date Element
createElement('expiry', options?)
Use this function to create an instance of an individual Element.
Parameters
The type of element you are creating.
Options for creating expiry Element.
Returns
ExpiryElement | nullTypeScript
1import { createElement } from '@airwallex/components-sdk';2const element = createElement('expiry');
ExpiryElementOptions
Applies to split card element type integration, the interface used when createElement() with type expiry.
Whether the expiry Element input is disabled or not. Default value is false.
A short hint to suggest the expected value of an input field to the shopper.
Style for the expiry Element.
ExpiryElement
Functions and external fields can be used in your integration flow with Airwallex element
TypeScript
1// There are two ways to mount the element:2// 1. Call with the container DOM id3element.mount('container-dom-id');45// 2. Find the created DOM in the existing HTML and call with the container DOM element6const containerElement = document.getElementById('container-dom-id');7element.mount(containerElement);
TypeScript
1element.on('change', () => {2 // Handle change event3});
TypeScript
1element.unmount();
update(options?, initOptions?)
Using this function to update the element option after create the element.
Returns
voidTypeScript
1element.update({2 placeholder: 'replace-with-your-placeholder',3});