jQuery Datepicker - keep open after selecting a date and close with the button “Done”

前端 未结 1 845
既然无缘
既然无缘 2021-01-28 13:08

I honestly hope you can help me with that as I have spent quite some time searching on the net for appropriate solutions and could not find any.

The issue I am having i

相关标签:
1条回答
  • 2021-01-28 14:02

    Here is a working fiddle: http://jsfiddle.net/9uc7dwoa/

    This is doing the trick in the onSelect:

    if (inst.inline)
            this._updateDatepicker(inst);
    else {
          this._hideDatepicker(null, this._get(inst, 'duration'));
          this._lastInput = inst.input[0];
          if (typeof(inst.input[0]) != 'object')
          inst.input[0].focus(); // restore focus
          this._lastInput = null;
    }
    

    Here the reference of the answer with the used code: jQuery Datepicker: Prevent closing picker when clicking a date

    0 讨论(0)
提交回复
热议问题