简体   繁体   中英

Jquery date plugin not working properly when it is used in accordion

After clicking the date picker if i scroll the accordion content the expanded area of datepicker is not moving.

Calendar not moving with the date after scrolling

As this post suggests, its a known problem while using datepicker in scrolable div....you can use the .blur() method on scroll event to make it look better..

Just pasting the demo code from the previous post(in case that gets removed):

var datePicker = $('#datepicker').datepicker();

$(".demo").scroll(function() {
  datePicker.datepicker('hide');
  $('#datepicker').blur();
});

$(window).resize(function() {
  datePicker.datepicker('hide');
  $('#datepicker').blur();
});

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM