0
点赞
收藏
分享

微信扫一扫

leetcode 刷题周报(9.3-9.10)

DYBOY 2024-09-13 阅读 37

uniapp组件uni-datetime-picker选择年月后在ios上日期不显示

操作步骤:
ios 选择年月

预期结果:
日期变为选择年月的日期

实际结果:
日期不显示

bug描述:
uni-datetime-picker 2.2.22 ios点击年月选择后日期不显示

解决方案

修改 \uni_modules\uni-datetime-picker\components\uni-datetime-picker\calendar.vue

全局搜索函数 bindDateChange函数 并找到bindDateChange方法 并进行如下替换


			bindDateChange(e) {
				// const value = e.detail.value + '-1'
				const value = e.detail.value + '-01'
				this.setDate(value)
			},

原因:
选择年月后,时间变成了 XXXX-XX-1,在 util.js 文件的 fixIosDateFormat 函数中正则test 失败

举报

相关推荐

Leetcode刷题

leetcode刷题

LeetCode刷题 --- 链表

leetcode刷题计划

刷题打卡:leetcode

LeetCode刷题笔记

LeetCode:数组刷题

0 条评论