How to wrap the datepicker in a new div?

前端 未结 2 858
滥情空心
滥情空心 2021-01-21 08:14

I need to put my datepicker in a new div, that will be a (shadow-)border-div.

I\'ve tried the following:

beforeShow: function (input) {
  $(input).datepi         


        
2条回答
  •  误落风尘
    2021-01-21 09:02

    $('#datepicker').wrap('
    ');

    Here #datepicker is the id of datepicker input field, you may have something else.

    Check jQuery .wrap().

    You don't need to do this within beforeShow(). Do it within DOM ready function.

    To wrap each inner element of datepicker you should try

    $('div#ui-datepicker-div > *').wrap('
    ');

提交回复
热议问题