
function geshi(qian, hou) {

    if (qian != "" && hou != "") {
        var startdate = new Date(qian.replace(/-/g, "/"));
        var enddate = new Date(hou.replace(/-/g, "/"));
        if (startdate <= enddate) {
            return "";
        }
        else {
            return "开始日期不能大于截至日期！";
        }
    }

    if (qian != ""&&hou=="" ) {
        var startdate = new Date(qian.replace(/-/g, "/"));

        if (startdate != "NaN") {
            return "";
        }
        else {
            return "日期格式不正确！";
        }
    }
    if (qian == "" && hou != "") {

        var enddate = new Date(hou.replace(/-/g, "/"));
        if ("NaN" != enddate) {
            return "";
        }
        else {
            return "日期格式不正确！";
        }
    }
    if (qian == "" && hou == "") {
        return "";
    }
    
}
