美文网首页前端开发
小程序picker组件BUG,fields属性为month时,I

小程序picker组件BUG,fields属性为month时,I

作者: 紫气楠楠 | 来源:发表于2019-10-18 15:36 被阅读0次

问题描述:picker组件BUG,fields属性为month时,苹果手机上下拉显示1年、2年、3年...;

解决方法:

<picker mode='date' value="{{date}}" fields='month' start="1970-01-01" end="2080-01-01" bindchange="bindDateChange">
   <view>{{date}} <icon class="iconfont icon-xiala-"></icon></view>
</picker>

把start和end的时间格式改成YYYY-MM-DD,就行了,例如: start="1970-01-01" end="2080-01-01"

相关文章

网友评论

    本文标题:小程序picker组件BUG,fields属性为month时,I

    本文链接:https://www.haomeiwen.com/subject/tdoimctx.html