1. Date format problem
New Date(‘2020-01-01’) to nan-nan-nan New Date(‘2020-01-01’. Replace (/-/g, ‘/’))
Picker mode=date picker mode=date
Let’s take a look at the format of the value in the wechat document, YYYY-MM-DD, whether the fields are year/month or the same.
yearChange(e) {
this.setData({
selectDate: e.detail.value,
selectFormatDate: e.detail.value.toString() + '- 01-01'.// fields=year -01-01
sectionStr: 'year'})},monthChange(e) {
this.setData({
selectDate: e.detail.value,
selectFormatDate: e.detail.value.toString() + '- 01'.// fields=year, -01
sectionStr: 'month'})},dateChange(e) {
if(this.data.sectionStr == 'year') {
this.yearChange(e);
}else {
this.monthChange(e); }},Copy the code
The preceding two problems only occur on ios devices, but are normal on Android devices.
Picker mode = multiSelector
While scrolling, clicking OK will cause unexpected effects -! The picker-view component found the bindPickStart bindPickend event
4. The CSS attribute mask-image
Mask-box-image is required
5, swiper inside using postion fixed is quite absolute
.