<tap-date-picker>

Date and time picker. Wraps native inputs such as <input type="date">, opening the system picker on tap, as a controlled component. value uses the native format, and the displayed text is formatted for the current locale.

Example

Constraints

min, max and step are passed to the native input, but some platforms (such as iOS) don't enforce them in the picker, so validate on submit.

API

包装原生日期/时间输入框,value 使用原生格式,例如 2026-11-04、14:30、2026-11-04T14:30、2026-11

Shadow DOM; Extends GemElement

Instance Properties

Property(Attribute) Reactive Type Description
change Emitter<string>
name(name) Yes string
value(value) Yes string
type(type) Yes DatePickerType
placeholder(placeholder) Yes string
min(min) Yes string
max(max) Yes string
step(step) Yes number 单位:time/datetime 为秒,date 为天,month 为月
required(required) Yes boolean
disabled(disabled) Yes boolean
autofocus(autofocus) Yes boolean
clearable(clearable) Yes boolean
icon Yes string | Element | DocumentFragment

Other

Type Value
Event change
Part text, icon, indicator, clear