隐藏日期选择器的日历图像

时间:2019-06-27 08:27:37

标签: javascript jquery css

about_Profiles我遵循此代码,我想隐藏代码这一部分的图像图标日历,(datePicker.setMonthpicker("#inq_end_dt", inqEndDt);)怎么做?

setCalendar: function() {       
    var inqStrDt = "";
    var inqEndDt = "";
    if(todate.substr(6,8)<=20) {
        inqStrDt = formatter.datetime(webank.date_minus(todate,todate.substr(6,8)), "yyyy-mm");
        inqEndDt = formatter.datetime(webank.date_minus(todate, todate.substr(6,8)), "yyyy-mm");
    } else {
        inqStrDt = formatter.datetime(todate, "yyyy-mm");
        inqEndDt = formatter.datetime(todate, "yyyy-mm");
    }

    datePicker.setMonthpicker("#inq_str_dt", inqStrDt);

    datePicker.setMonthpicker("#inq_end_dt", inqEndDt);     
}

2 个答案:

答案 0 :(得分:0)

如果您只想隐藏ID为sessionStorage.getItem('key') 的元素:

inq_str_dt

答案 1 :(得分:0)

我确实那样。现在很好,谢谢~~~

setCalendar:function(){

    var inqStrDt = "";
    var inqEndDt = "";
    if(todate.substr(6,8)<=20){
        inqStrDt = formatter.datetime(webank.date_minus(todate,todate.substr(6,8)), "yyyy-mm");
        inqEndDt = formatter.datetime(webank.date_minus(todate, todate.substr(6,8)), "yyyy-mm");
    }else{
        inqStrDt = formatter.datetime(todate, "yyyy-mm");
        inqEndDt = formatter.datetime(todate, "yyyy-mm");
    }



    datePicker.setMonthpicker("#inq_str_dt", inqStrDt);

    //datePicker.setMonthpicker("#inq_end_dt", inqEndDt);
    $("#inq_end_dt").val(inqEndDt);
}