h***@163.com
h***@163.com
  • 发布:2023-08-19 10:42
  • 更新:2023-08-19 10:43
  • 阅读:194

picker日期组件在iphone13pro显示NaN-0NaN-0NaN

分类:uni-app

<picker :end="endDate" start="1900-01-01" mode="date" :value="form.birthday" @change="bindPickerDateChange">
<input class="input-size" type="text" v-model="form.birthday" disabled placeholder="请选择出生年月">
<uni-icons class="open-icon" type="arrowright" size="15"></uni-icons>
</picker>

选择日期之后使用change事件打印e.detail.value的值为NaN-0NaN-0NaN,因此将value值赋给form.birthday拿到的值也为NaN-0NaN-0NaN

2023-08-19 10:42 负责人:无 分享
已邀请:
h***@163.com

h***@163.com (作者)

组件使用的代码是
<picker :end="endDate" start="1900-01-01" mode="date" :value="form.birthday" @change="bindPickerDateChange">
<input class="input-size" type="text" v-model="form.birthday" disabled
placeholder="请选择出生年月">
<uni-icons class="open-icon" type="arrowright" size="15"></uni-icons>
</picker>

要回复问题请先登录注册