()
| 299 | }); |
| 300 | }, |
| 301 | scrollIntoView() { |
| 302 | setTimeout(() => { |
| 303 | const { currentDate, type, show, minDate, maxDate } = this.data; |
| 304 | const targetDate = type === 'single' ? currentDate : currentDate[0]; |
| 305 | const displayed = show; |
| 306 | if (!targetDate || !displayed) { |
| 307 | return; |
| 308 | } |
| 309 | const months = getMonths(minDate, maxDate); |
| 310 | months.some((month, index) => { |
| 311 | if (compareMonth(month, targetDate) === 0) { |
| 312 | this.setData({ scrollIntoViewIndex: `month${index}` }); |
| 313 | return true; |
| 314 | } |
| 315 | return false; |
| 316 | }); |
| 317 | }, 100); |
| 318 | }, |
| 319 | closePicker() { |
| 320 | this.setData({ |
| 321 | show: false |
nothing calls this directly
no test coverage detected