Version 2025-07 is the last API version to support React-based UI components. Later versions use web components, native UI elements with built-in accessibility, better performance, and consistent styling with Shopify's design system. Check out the migration guide to upgrade your extension.
DatePicker
The DatePicker component is a calendar picker UI that allows users to select a single date or a date range.
Supported targets
- Checkout::Actions::Render
Before - Checkout::Cart
Line Details::Render After - Checkout::Cart
Lines::Render After - Checkout::Contact::Render
After - Checkout::Customer
Information::Render After - Checkout::Delivery
Address::Render Before - Checkout::Dynamic::Render
- Checkout::Pickup
Locations::Render After - Checkout::Pickup
Locations::Render Before - Checkout::Pickup
Points::Render After - Checkout::Pickup
Points::Render Before - Checkout::Reductions::Render
After - Checkout::Reductions::Render
Before - Checkout::Shipping
Method Details::Render After - Checkout::Shipping
Method Details::Render Expanded - Checkout::Shipping
Methods::Render After - Checkout::Shipping
Methods::Render Before - Checkout::Thank
You::Cart Line Details::Render After - Checkout::Thank
You::Cart Lines::Render After - Checkout::Thank
You::Customer Information::Render After - Checkout::Thank
You::Dynamic::Render - purchase.
checkout. actions. render-before - purchase.
checkout. block. render - purchase.
checkout. cart-line-item. render-after - purchase.
checkout. cart-line-list. render-after - purchase.
checkout. contact. render-after - purchase.
checkout. delivery-address. render-after - purchase.
checkout. delivery-address. render-before - purchase.
checkout. footer. render-after - purchase.
checkout. header. render-after - purchase.
checkout. payment-method-list. render-after - purchase.
checkout. payment-method-list. render-before - purchase.
checkout. pickup-location-list. render-after - purchase.
checkout. pickup-location-list. render-before - purchase.
checkout. pickup-location-option-item. render-after - purchase.
checkout. pickup-point-list. render-after - purchase.
checkout. pickup-point-list. render-before - purchase.
checkout. reductions. render-after - purchase.
checkout. reductions. render-before - purchase.
checkout. shipping-option-item. details. render - purchase.
checkout. shipping-option-item. render-after - purchase.
checkout. shipping-option-list. render-after - purchase.
checkout. shipping-option-list. render-before - purchase.
thank-you. announcement. render - purchase.
thank-you. block. render - purchase.
thank-you. cart-line-item. render-after - purchase.
thank-you. cart-line-list. render-after - purchase.
thank-you. customer-information. render-after - purchase.
thank-you. footer. render-after - purchase.
thank-you. header. render-after
Supported targets
- Checkout::Actions::Render
Before - Checkout::Cart
Line Details::Render After - Checkout::Cart
Lines::Render After - Checkout::Contact::Render
After - Checkout::Customer
Information::Render After - Checkout::Delivery
Address::Render Before - Checkout::Dynamic::Render
- Checkout::Pickup
Locations::Render After - Checkout::Pickup
Locations::Render Before - Checkout::Pickup
Points::Render After - Checkout::Pickup
Points::Render Before - Checkout::Reductions::Render
After - Checkout::Reductions::Render
Before - Checkout::Shipping
Method Details::Render After - Checkout::Shipping
Method Details::Render Expanded - Checkout::Shipping
Methods::Render After - Checkout::Shipping
Methods::Render Before - Checkout::Thank
You::Cart Line Details::Render After - Checkout::Thank
You::Cart Lines::Render After - Checkout::Thank
You::Customer Information::Render After - Checkout::Thank
You::Dynamic::Render - purchase.
checkout. actions. render-before - purchase.
checkout. block. render - purchase.
checkout. cart-line-item. render-after - purchase.
checkout. cart-line-list. render-after - purchase.
checkout. contact. render-after - purchase.
checkout. delivery-address. render-after - purchase.
checkout. delivery-address. render-before - purchase.
checkout. footer. render-after - purchase.
checkout. header. render-after - purchase.
checkout. payment-method-list. render-after - purchase.
checkout. payment-method-list. render-before - purchase.
checkout. pickup-location-list. render-after - purchase.
checkout. pickup-location-list. render-before - purchase.
checkout. pickup-location-option-item. render-after - purchase.
checkout. pickup-point-list. render-after - purchase.
checkout. pickup-point-list. render-before - purchase.
checkout. reductions. render-after - purchase.
checkout. reductions. render-before - purchase.
checkout. shipping-option-item. details. render - purchase.
checkout. shipping-option-item. render-after - purchase.
checkout. shipping-option-list. render-after - purchase.
checkout. shipping-option-list. render-before - purchase.
thank-you. announcement. render - purchase.
thank-you. block. render - purchase.
thank-you. cart-line-item. render-after - purchase.
thank-you. cart-line-list. render-after - purchase.
thank-you. customer-information. render-after - purchase.
thank-you. footer. render-after - purchase.
thank-you. header. render-after
- Anchor to selectedselectedselectedTTrequiredrequired
A date, an array of dates, or a range object with
startand/orendkeys indicating the selected dates. When a range is set, dates between the boundaries will be selected.- Anchor to defaultYearMonthdefaultYearMonthdefaultYearMonthYearMonthYearMonth
Default uncontrolled year and month to display. Ignored when year/month navigation is controlled.
- Anchor to disableddisableddisabledDisabledDate[] | booleanDisabledDate[] | boolean
Disabled dates, days, and/or ranges, or the date picker. Unbound range disables all dates either from
startdate or toenddate.truedisables the date picker.- Anchor to onChangeonChangeonChange(selected: T) => void(selected: T) => void
A callback fired when the selected date or dates change. This callback is called with a string, an array of strings or a range object representing the selected dates. This component is controlled, so you must store these values in state and reflect it back in the
selectedprops.- Anchor to onYearMonthChangeonYearMonthChangeonYearMonthChange(yearMonth: { year: number; month: number; }) => void(yearMonth: { year: number; month: number; }) => void
A callback fired when the displayed year and month change. This callback is called with an object indicating the year/month the UI should change to. When year/month navigation is controlled you must store these values in state and reflect it back in the
prop.- Anchor to readOnlyreadOnlyreadOnlybooleanboolean
Whether the date picker is read-only and can't be edited. Read-only date pickers remain focusable and their state is announced by screen readers where applicable.
- Anchor to yearMonthyearMonthyearMonthYearMonthYearMonth
Controlled year and month to display. Use in combination with
. Makes year/month navigation controlled.
YearMonth
{year: number; month: number} | YearMonthStringYearMonthString
A year/month string using the simplified ISO 8601 format (`YYYY-MM`)
stringDisabledDate
DateString | DateRange | DayStringDateString
stringDateRange
- end
Last day (inclusive) of the selected range
DateString - start
First day (inclusive) of the selected range
DateString
DayString
keyof typeof DayDay
- Sunday
0 - Monday
1 - Tuesday
2 - Wednesday
3 - Thursday
4 - Friday
5 - Saturday
6
Anchor to ExamplesExamples
Anchor to Basic DatePickerBasic Date Picker
Basic DatePicker

Basic DatePicker
React
import {
reactExtension,
DatePicker,
} from '@shopify/ui-extensions-react/checkout';
export default reactExtension(
'purchase.checkout.block.render',
() => <Extension />,
);
function Extension() {
return <DatePicker selected="2021-06-01" />;
}JS
import {extension, DatePicker} from '@shopify/ui-extensions/checkout';
export default extension('purchase.checkout.block.render', (root) => {
const datepicker = root.createComponent(DatePicker, {
selected: '2021-06-01',
});
root.appendChild(datepicker);
});Anchor to Best practicesBest practices
- Set the initial calendar month: Use
defaultYearMonthso the calendar opens on a relevant month, or controlyearMonthwhen navigation is fully controlled. - Restrict invalid dates: Use
disabledto block specific dates, ranges, or days. - Model selection correctly:
selectedcan be a single date string, an array for multiple selection, or a range object withstartand/orend, depending on your use case.
Anchor to LimitationsLimitations
- Time-of-day selection isn't available; only calendar dates are supported.
- Dates use
YYYY-MM-DDstrings (range objects use those strings). Locale-specific formats aren't supported.