* change datetime picker position when there is no space to display on the bottom side.

This commit is contained in:
Catouse
2014-11-25 19:45:24 +08:00
parent 9fbc96859f
commit a28f16a8b3
+5
View File
@@ -15,6 +15,11 @@ $(function()
return $(this).each(function()
{
var $this = $(this);
if($this.offset().top + 200 > $(document.body).height())
{
$this.attr('data-picker-position', 'top-right');
}
if($this.val() == '0000-00-00')
{
$this.focus(function(){if($this.val() == '0000-00-00') $this.val('')}).blur(function(){if($this.val() == '') $this.val('0000-00-00')});