Datepicker window tries to guess a place where it can be seen.

Minor feature addition. If you have date picker at the bottom of the screen you end up situation you can't see date picker anymore. This patch make date picker to appear up if there ain't room down. If there is no room up you end up in same situation but most of the time it works as expected. It would be nice to have feature like this one with drop down menus also.