| 12345678910111213141516171819202122232425 |
- <!--界面日期下拉组件-->
- <wxs module="mDate">
- var format = function (time) {
- var date = getDate(time);
- var year = date.getFullYear()
- var month = date.getMonth() + 1
- var day = date.getDate()
- var hour = date.getHours()
- var minute = date.getMinutes()
- var second = date.getSeconds()
- return year + '-' + month + '-' + day + ' ' + hour + ':' + minute + ':' + second
- }
- module.exports.format = format;
- </wxs>
- <!-- 日期 -->
- <view class="drop-open" wx:if="{{show}}">
- <van-popup show="{{ show }}" position="bottom" customStyle="border-radius: 30rpx 30rpx 0px 0px;" bind:close="onCloseChooseDate" bind:click-overlay="onCloseChooseDate">
- <view style="display:flex;justify-content: space-around;height:80rpx;">
- <view style="width:45%;text-align: left;color:#b6b6b6;line-height:80rpx;" catchtap="onCloseChooseDate">取消</view>
- <view style="width:45%;text-align: right;color:#00A7B5;line-height:80rpx;" catchtap="onConfirmChooseDate">确定</view>
- </view>
- <van-datetime-picker show-toolbar="{{false}}" bindonlyinput="changeDate" type="datetime" loading="{true}" value="{{ timeValue }}" formatter="{{formatter}}" />
- </van-popup>
- </view>
|