format = $format; return $this; } protected function prepareInputValue($value) { if ($value === '') { $value = null; } return $value; } public function render() { $this->options['format'] = $this->format; $this->options['locale'] = config('app.locale'); $this->options['allowInputToggle'] = true; $this->script = "$('{$this->getElementClassSelector()}').datetimepicker(".admin_javascript_json($this->options).');'; $this->prepend('') ->defaultAttribute('style', 'width: 200px;flex:none'); return parent::render(); } }