indrimuska / angular-moment-picker

Angular Moment Picker is an AngularJS directive for date and time picker using Moment.js.
http://indrimuska.github.io/angular-moment-picker/
MIT License
525 stars 226 forks source link

scrolling in a modal #185

Open kinoli opened 7 years ago

kinoli commented 7 years ago

I have the picker show up under an input field inside a modal that scrolls. Since it is attached to the body and not the modal, when you scroll, the picker remains fixed and becomes disconnected to the input field it came from. Is there any way to attach the picker to the dom object that created it?

kinoli commented 7 years ago

Perhaps there's a way to just close the datepicker if the person scrolls. Any way to do that?

gauravBrain commented 7 years ago

i have the same problem using angular js uibmodel.

vikobg commented 7 years ago

Is there any update on this ?

zealash commented 6 years ago

I am having the same issue. using v0.10.2.

ellencheung39 commented 5 years ago

Found a workaround here.

$('.modal').on('scroll', function () { if ($('.moment-picker')[0]) { angular.element('.header-view').scope().$parent.view.position(); } });