Implementing jQuery DatePicker in Bootstrap modal

后端 未结 7 1263
别那么骄傲
别那么骄傲 2020-12-01 13:41

Created jsfiddle for my issue http://jsfiddle.net/sudiptabanerjee/93eTU/

In modal window issue is on Change Month and Change Year combos.

a) IE 11: everythin

7条回答
  •  [愿得一人]
    2020-12-01 14:16

    Building off of Surjith's answer, I added a try/catch block to resolve a ReferenceError exception for confModal being undefined.

    Coffeescript:

    enforceModalFocusFn = $.fn.modal.Constructor::enforceFocus
    
    $.fn.modal.Constructor::enforceFocus = ->
    
    try
      $confModal.on "hidden", ->
        $.fn.modal.Constructor::enforceFocus = enforceModalFocusFn
        return
      $confModal.modal backdrop: false
    catch error
      if error.name != 'ReferenceError'
        throw error
    

提交回复
热议问题