Date Picker
The component allows merchants to select dates using a calendar interface. Use it when merchants benefit from seeing dates in context of the full month, such as selecting dates relative to today or needing weekday context.
The component supports single dates, multiple dates, and date ranges. For tight spaces, consider using instead. For text date entry, use .
Supported targets
- pos.
cart. line-item-details. action. render - pos.
customer-details. action. render - pos.
customer-details. block. render - pos.
draft-order-details. action. render - pos.
draft-order-details. block. render - pos.
exchange. post. action. render - pos.
exchange. post. block. render - pos.
home. modal. render - pos.
order-details. action. render - pos.
order-details. block. render - pos.
product-details. action. render - pos.
product-details. block. render - pos.
purchase. post. action. render - pos.
purchase. post. block. render - pos.
register-details. action. render - pos.
register-details. block. render - pos.
return. post. action. render - pos.
return. post. block. render
Supported targets
- pos.
cart. line-item-details. action. render - pos.
customer-details. action. render - pos.
customer-details. block. render - pos.
draft-order-details. action. render - pos.
draft-order-details. block. render - pos.
exchange. post. action. render - pos.
exchange. post. block. render - pos.
home. modal. render - pos.
order-details. action. render - pos.
order-details. block. render - pos.
product-details. action. render - pos.
product-details. block. render - pos.
purchase. post. action. render - pos.
purchase. post. block. render - pos.
register-details. action. render - pos.
register-details. block. render - pos.
return. post. action. render - pos.
return. post. block. render
Use cases
- Visual selection: Provide visual date selection for appointments or scheduling workflows.
- Report filtering: Enable quick date selection for filtering reports or analytics.
- Touch optimization: Support touch-optimized date input on POS devices.
- Calendar context: Allow users to see calendar context like day of week when selecting dates.
Anchor to examplesExamples
Anchor to example-select-dates-with-a-calendar-pickerSelect dates with a calendar picker
Enable visual date selection using a component with a calendar interface. This example shows a basic date picker with month view and date selection.
Select dates with a calendar picker

Select dates with a calendar picker
Anchor to example-control-picker-visibilityControl picker visibility
Control visibility programmatically using the command system with show and hide methods. This example demonstrates using button commands to display or dismiss the calendar picker, enabling custom trigger patterns for date selection workflows.
Control picker visibility
Anchor to example-handle-date-selection-eventsHandle date selection events
Subscribe to date selection events to respond when merchants pick a date from the calendar. This example shows how to handle events to capture selected dates, enabling validation, scheduling logic, or dynamic updates based on the chosen date.
Handle date selection events
Examples
Select dates with a calendar picker
Description
Enable visual date selection using a `DatePicker` component with a calendar interface. This example shows a basic date picker with month view and date selection.
Default
<s-button command="--show" commandFor="date-picker"> Show </s-button> <s-date-picker id="date-picker" value="2025-10-08" />Control picker visibility
Description
Control `DatePicker` visibility programmatically using the command system with `show` and `hide` methods. This example demonstrates using button commands to display or dismiss the calendar picker, enabling custom trigger patterns for date selection workflows.
Default
<> <s-button command="--show" commandFor="date-picker"> Select Date </s-button> <s-date-picker id="date-picker" value="2024-10-26" onChange={(event) => console.log('Date selected:', event.currentTarget.value)} /> </>;Handle date selection events
Description
Subscribe to date selection events to respond when merchants pick a date from the calendar. This example shows how to handle `onChange` events to capture selected dates, enabling validation, scheduling logic, or dynamic updates based on the chosen date.
Default
<s-date-picker value="2024-10-26" onInput={(event) => console.log('Input:', event.currentTarget.value)} onChange={(event) => console.log('Change:', event.currentTarget.value)} onFocus={(event) => console.log('Focus')} onBlur={(event) => console.log('Blur')} />
Anchor to propertiesProperties
Configure the following properties on the component.
- Anchor to idididstringstring
A unique identifier for the element.
- Anchor to valuevaluevaluestringstringDefault: ""Default: ""
Current selected value.
The default means no date is selected.
If the provided value is invalid, no date is selected.
Otherwise:
- If
type="single", this is a date informat. - If
type="multiple", this is a comma-separated list of dates informat. - If
type="range", this is a range informat. The range is inclusive.
- If
Anchor to eventsEvents
The component provides event callbacks for handling user interactions. Learn more about handling events.
- Anchor to blurblurblur(event: CallbackEvent<"s-date-picker">) => void(event: CallbackEvent<"s-date-picker">) => void
Callback when the date picker is dismissed.
- Anchor to changechangechange(event: CallbackEvent<"s-date-picker">) => void(event: CallbackEvent<"s-date-picker">) => void
Callback when the user selects a date from the picker that is different to the current value.
- Anchor to focusfocusfocus(event: CallbackEvent<"s-date-picker">) => void(event: CallbackEvent<"s-date-picker">) => void
Callback when the date picker is revealed.
- Anchor to inputinputinput(event: CallbackEvent<"s-date-picker">) => void(event: CallbackEvent<"s-date-picker">) => void
Callback when the user selects a date from the picker.
CallbackEvent
- bubbles
boolean - cancelable
boolean - composed
boolean - currentTarget
HTMLElementTagNameMap[T] - detail
any - eventPhase
number - target
HTMLElementTagNameMap[T] | null
interface CallbackEvent<T extends keyof HTMLElementTagNameMap> {
currentTarget: HTMLElementTagNameMap[T];
bubbles?: boolean;
cancelable?: boolean;
composed?: boolean;
detail?: any;
eventPhase: number;
target: HTMLElementTagNameMap[T] | null;
}Anchor to best-practicesBest practices
- Choose for calendar-based selection: Use
when users benefit from seeing a calendar view, like selecting dates relative to today or needing weekday context. Usefor tight spaces orwhen users know the exact date. - Provide adequate space: Ensure sufficient spacing around the picker to avoid interfering with on-screen keyboards or other interactive elements.