elclanrs
elclanrs

Reputation: 94101

jQuery UI Datepicker position bottom or top but not both

I'm using the Datepicker plugin and customizing it to my needs. I was able to do mostly everything I needed in CSS but there's one thing that is bothering me. When the calendar opens depending on where you are on your screen it will appear on top or under the input. How can I have control over this behavior? I'm trying to adapt it to a responsive layout so sometimes I want it on top and other times I want it under but not both.

Upvotes: 0

Views: 2102

Answers (1)

ori
ori

Reputation: 7847

Datepicker calls $.datepicker._checkOffset to calculate the position.

I would grab the original function (from here) and redefine it according to my needs.

Upvotes: 4

Related Questions