<tap-date-picker>

日期时间选择器。包装原生 <input type="date"> 等输入框,点击后弹出系统自带的选择器,为受控组件。value 使用原生格式,显示文本根据当前语言格式化。

Example

约束

min、max、step 会传递给原生输入框,但部分平台(如 iOS)的选择器不会遵守,提交时需要自行校验。

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