Mini Program uses picker to write the calendar, how to make the start date before the end date. The end date cannot be selected before the start date

problem description

the environmental background of the problems and what methods you have tried

related codes

/ / Please paste the code text below (do not replace the code with pictures)

    <view>
      <picker mode="date" value="{{startTime}}"  bindchange="bindDateChange1">
        <view class="picker">
          <text></text> <text class="chosedate">{{startTime}}</text>
        </view>
      </picker>
      <picker mode="date" value="{{endTime}}"  bindchange="bindDateChange2">
        <view class="picker">
          <text></text> <text class="chosedate">{{endTime}}</text>
        </view>
      </picker>
    </view>
    
    
    // 
  bindDateChange1: function (e) {
    console.log(e.detail.value)
    this.setData({
      startTime: e.detail.value
    })
  },
  bindDateChange2: function (e) {
    this.setData({
      endTime: e.detail.value
    })
  }

what result do you expect? What is the error message actually seen?

expected result: I chose the unselectable after the start date and before the end date
Xiaobai asks for advice

Apr.02,2021

set the start date to end is the selected value of the end date, and the start of the set end date is the selected value of the start date

Menu