protected function buildDatetimepicker($input, array $options = [])
    {
        $this->Asset->script([
            '/vendor/moment/moment-with-locales.min',
            'MeTools.bootstrap-datetimepicker.min',
        ], ['block' => 'script_bottom']);

        $this->Asset->css(
            '/vendor/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min',
            ['block' => 'css_bottom']
        );

        $options = optionsParser($options, [
            'icons' => [
                'time' => 'fas fa-clock',
                'date' => 'fas fa-calendar',
                'up' => 'fas fa-chevron-up',
                'down' => 'fas fa-chevron-down',
                'previous' => 'fas fa-chevron-left',
                'next' => 'fas fa-chevron-right',
                'today' => 'fas fa-dot-circle',
                'clear' => 'fas fa-trash',
                'close' => 'fas fa-times',
            ],
            'locale' => substr(I18n::getLocale(), 0, 2) ?: 'en-gb',
            'showTodayButton' => true,
            'showClear' => true,
        ]);

        return sprintf('$("%s").datetimepicker(%s);', $input, json_encode($options->toArray(), JSON_PRETTY_PRINT));
    }