浏览代码

修复Form::date时间日期表单显示定位异常问题

jqh 5 年之前
父节点
当前提交
147517324c
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/Form/Field/Date.php

+ 1 - 1
src/Form/Field/Date.php

@@ -36,7 +36,7 @@ class Date extends Text
         $this->options['locale'] = config('app.locale');
         $this->options['allowInputToggle'] = true;
 
-        $this->script = "$('{$this->getElementClassSelector()}').parent().datetimepicker(".json_encode($this->options).');';
+        $this->script = "$('{$this->getElementClassSelector()}').datetimepicker(".json_encode($this->options).');';
 
         $this->prepend('<i class="fa fa-calendar fa-fw"></i>')
             ->defaultAttribute('style', 'width: 200px');