<template>
    <div>
        <van-nav-bar
                title="date"
                left-arrow
                @click-left="back"
        />
        <div>

            <ul>
                <li class="section">
                    <y-date :select-start-time.sync="startTime"
                            :start-date="startDate"
                            :end-date="endDate"
                            :select-end-time.sync="endTime"></y-date>
                </li>
            </ul>

        </div>
    </div>
</template>

<script>
    import {NavBar,Popup} from 'vant';
    import {getTime} from "../utils/utils"
    import yDate from "../components/yDate";

    export default {
        components: {
            yDate,
            [NavBar.name]: NavBar,
            [Popup.name]: Popup,
        },
        data:()=>{
            return {
                index:0,
                tipsShow:false,
                t:(function(){
                    let ret = [];
                    for(var n=0;n<100;n++){
                        ret.push(n)
                    }
                    return ret;
                })(),
                isTimePickerShow:false,
                startTime:"2020-06-09 05:25:00",

                endTime:"2020-07-20 12:25:00",
                startDate:getTime(new Date().getTime()-(24*60*60*1000),"YYYY-mm-dd hh:ii:ss"),
                endDate:getTime(new Date().getTime()+(365*24*60*60*1000),"YYYY-mm-dd hh:ii:ss"),
            }
        },
        methods:{

            back:()=>{
                window.history.go(-1);
            }
        },
        mounted(){
            const self = this;
            setTimeout(data=>{
                self.isTimePickerShow = true;
            },)
        }
    }
</script>

<style lang="scss">
    .page {
        padding: 10px;
    }
    .y-gobal-popup--time{
        width: 100vw;
        height: 100vh;
        overflow: hidden;

        /*.yDate{
            overflow: hidden;
            position: relative;
            height: auto;
            left:auto;
        }
        .yDate_Time{
            //position: fixed;
        }*/
    }
</style>
