* change datetime picker position when there is no space to display on the bottom side.
This commit is contained in:
@@ -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')});
|
||||
|
||||
Reference in New Issue
Block a user