Laravel-admin: bootstrap-datetimepicker issue

Created on 31 Mar 2019  ·  2Comments  ·  Source: z-song/laravel-admin

  • Laravel Version: 5.5
  • PHP Version:7.2
  • Laravel-admin: last version

Description:

How can i change position of time or date picker ?
i know it is solved by widgetPositioning
(Takes an object parameter that can contain two keys vertical and horizontal each having a value of 'auto', 'top', 'bottom' for vertical and 'auto', 'left', 'right' for horizontal which defines where the dropdown with the widget will appear relative to the input element the component is attached to.)

but I do not know how to do it.

Most helpful comment

  • Laravel Version: 5.5
  • PHP Version:7.2
  • Laravel-admin: last version

Description:

How can i change position of time or date picker ?
i know it is solved by widgetPositioning
(Takes an object parameter that can contain two keys vertical and horizontal each having a value of 'auto', 'top', 'bottom' for vertical and 'auto', 'left', 'right' for horizontal which defines where the dropdown with the widget will appear relative to the input element the component is attached to.)

but I do not know how to do it.
answer is 👍
$this->script = "$('{$this->getElementClassSelector()}').parent().datetimepicker({ format: 'ss:mm:HH', locale : 'en', allowInputToggle:true, widgetPositioning: { horizontal: 'right', vertical: 'top' } });";

in the Date or Time render function

All 2 comments

  • Laravel Version: 5.5
  • PHP Version:7.2
  • Laravel-admin: last version

Description:

How can i change position of time or date picker ?
i know it is solved by widgetPositioning
(Takes an object parameter that can contain two keys vertical and horizontal each having a value of 'auto', 'top', 'bottom' for vertical and 'auto', 'left', 'right' for horizontal which defines where the dropdown with the widget will appear relative to the input element the component is attached to.)

but I do not know how to do it.
answer is 👍
$this->script = "$('{$this->getElementClassSelector()}').parent().datetimepicker({ format: 'ss:mm:HH', locale : 'en', allowInputToggle:true, widgetPositioning: { horizontal: 'right', vertical: 'top' } });";

in the Date or Time render function

Hi, how did you managed to extend Encore\Admin\Form\Field\Date class?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

qcol picture qcol  ·  3Comments

benny-sun picture benny-sun  ·  3Comments

piian picture piian  ·  3Comments

abufalbo picture abufalbo  ·  3Comments

evans-kim picture evans-kim  ·  3Comments