Topic: DatePicker showing calendar dialog on tab re-focus

Diamond Obama pro asked 4 years ago


Calendar dialog shows repeatedly when you select a date on a calendar or close the dialog without selecting any date, and switch tabs.It keeps coming back whenever you switch to your site tab... as long as the date picker field has the current focus.You can try it on your example here: https://mdbootstrap.com/javascript/date-picker


Mikołaj Smoleński staff answered 4 years ago


Hi, Please try to write longer version of initialization code:
$('.datepicker').pickadate({
 onClose: function(){
  $(document.activeElement).blur()
 }
});
instead of:
$('.datepicker').pickadate();
Regards

icinema gr free commented 3 years ago

is not working if the datepicker is inside a modal with steps.


Mikołaj Smoleński staff commented 3 years ago

Hi there, Could You please share Your code or recreate the issue as a snippet (https://mdbootstrap.com/snippets/)? Best regards



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • User: Pro
  • Premium support: No
  • Technology: General Bootstrap questions
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: No
Tags