Explorar o código

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

jqh %!s(int64=5) %!d(string=hai) anos
pai
achega
147517324c
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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');