package com.zswc.creativity.utils.dialog

import android.content.Context
import com.zswc.creativity.inte.ChoiceData

/**
 * 选择时间
 *Created by shihuiyun
 *on 2020/9/26
 */
object ChoseTimeDialog {


    fun choseTime(context: Context,chosedata: ChoiceData){
        var beginDeadTime="2017-01-01"
        var defaultWeekBegin:String=""
        var defaultWeekEnd:String=""
        var time:String=""

        var mDoubleTimeSelectDialog=DoubleTimeSelectDialog(context,beginDeadTime,defaultWeekBegin,defaultWeekEnd)

        mDoubleTimeSelectDialog.setOnDateSelectFinished { startTime, endTime ->

            time = startTime.replace("-", "-") + "至" + endTime.replace("-", "-")
            chosedata.onRestuse(time)

        }
        mDoubleTimeSelectDialog.setOnDismissListener {

        }

        mDoubleTimeSelectDialog.recoverButtonState()
        mDoubleTimeSelectDialog.show()

    }


}
