How do I get rid of a zombie datepicker calendar after a bubble call?

How do I get rid of a zombie datepicker calendar after a bubble call?

belldrbelldr Posts: 12Questions: 4Answers: 0

My debugger code is utamij
I am using server-side to ColdFusion, although I don't know why this would make a difference in this case.

Everything works fine with this code to edit a date cell in the table using

    // bubble edit of courtdate, courttime
    $( sDBTableSelector ).on( 'click', 'tbody td:not(:first-child)', function (e) {
        // 10 is the position of CourtDate column in the table
        if ( $(this).index() == 10) {
            editor.bubble( this, ['courtdate','courttime'] );
        }
    } );

courtdate is a datepicker date, and courttime is a timepicker time.

However, when I click Update, and the edit is done, and the database is updated correctly, and the editor bubble goes away, I am left with a phantom datepicker calendar. It is phantom, because its controls do not work, which is expected since the datepicker field, in the bubble, is gone.

When I click away from the zombie, it disappears. However, the necessity to do this is quote annoying.

I have tried code like

        .on( 'postEdit', function () {
            // doesn't work, because calendar is not on the screen at this point??
            $('#ui-datepicker-div').css('display','none');

        } )

I can't find a datatables event, or jquery approach to killl the zombie.

Any ideas would be appreciated.

Answers

  • belldrbelldr Posts: 12Questions: 4Answers: 0

    I believe I have solved my own issued, by using

            .on( 'postEdit', function () {
                $('#ui-datepicker-div').remove();
            } ) 
    

    This is proof of the value of 'sleeping on it'.

    Thanks

This discussion has been closed.