您的位置:首页 > 移动开发

uni-app开始时间结束时间(结束时间大于开始时间)picker编写

2019-08-05 12:28 1576 查看

利用uni-app官网里面picker插件代码,点击开始时间后结束时间要大于选择后的开始时间,点击结束时间后开始时间要小于开始时间。

html代码

<view class="leave_cont">
<view class="ul">
<view class="li">
<text>开始时间</text>
<view class="flex1">
<picker mode="date" :value="start_date" :start="start_date" :end="other"  @change="bindDateChange">
<view class="date">{{start_date}}</view>
</picker>
</view>
</view>
<view class="li">
<text>结束时间</text>
<view class="flex1">
<picker mode="date" :value="start_date" :start="start_date" @change="bindDateChange2">
<view class="date">{{other}}</view>
</picker>
</view>
</view>
</view>
</view>

js代码

export default {
data() {
const currentDate = this.getDate({
format: true
})
return {
start_date: currentDate,
end_date: currentDate,
other:'请输入'
}
},
co
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐