How to add close text to datetimepicker bootstrap?

前端 未结 2 1559
礼貌的吻别
礼貌的吻别 2020-12-11 22:09
$(function() {
    $(\'input.month-mode\').datetimepicker({
        viewMode: \'months\',
        format: \'MM/YYYY\',
        showClose: true,
        maxDate: curr         


        
2条回答
  •  一个人的身影
    2020-12-11 22:26

    One way to do this is to use the icon classes to a add a new class and then use css to add some content. Something like:

    $(function() {
            $('input.month-mode').datetimepicker({
                viewMode: 'months',
                format: 'MM/YYYY',
                showClose: true,
                maxDate: current_month,
                icons: {
                    close: 'textclass1'
                    }
            });
        });
    

    Css:

    .textclass1::before {
      content: "Close";
    }
    

提交回复
热议问题