src/Contao/View/Contao2BackendView/ContaoWidgetManager.php
protected function buildDatePicker($objWidget)
    {
        $translator = $this->getEnvironment()->getTranslator();
        $strFormat  = $GLOBALS['TL_CONFIG'][$objWidget->rgxp . 'Format'];

        switch ($objWidget->rgxp) {
            case 'datim':
                $time = ",\n      timePicker:true";
                break;

            case 'time':
                $time = ",\n      pickOnly:\"time\"";
                break;
            default:
                $time = '';
        }

        return 'new Picker.Date($$("#ctrl_' . $objWidget->id . '"), {
            draggable:false,
            toggle:$$("#toggle_' . $objWidget->id . '"),
            format:"' . Date::formatToJs($strFormat) . '",
            positionOffset:{x:-197,y:-182}' . $time . ',
            pickerClass:"datepicker_bootstrap",
            useFadeInOut:!Browser.ie,
            startDay:' . $translator->translate('weekOffset', 'MSC') . ',
            titleFormat:"' . $translator->translate('titleFormat', 'MSC') . '"
        });';
    }
protected function buildDatePicker($objWidget)
    {
        $translator = $this->getEnvironment()->getTranslator();
        $strFormat  = $GLOBALS['TL_CONFIG'][$objWidget->rgxp . 'Format'];

        switch ($objWidget->rgxp) {
            case 'datim':
                $time = ",\n      timePicker:true";
                break;

            case 'time':
                $time = ",\n      pickOnly:\"time\"";
                break;
            default:
                $time = '';
        }

        return 'new Picker.Date($$("#ctrl_' . $objWidget->id . '"), {
            draggable:false,
            toggle:$$("#toggle_' . $objWidget->id . '"),
            format:"' . Date::formatToJs($strFormat) . '",
            positionOffset:{x:-197,y:-182}' . $time . ',
            pickerClass:"datepicker_bootstrap",
            useFadeInOut:!Browser.ie,
            startDay:' . $translator->translate('weekOffset', 'MSC') . ',
            titleFormat:"' . $translator->translate('titleFormat', 'MSC') . '"
        });';
    }
protected function buildDatePicker ( $ objWidget ) { $ translator = $ this -> getEnvironment ( ) -> getTranslator ( ) ; $ strFormat = $ GLOBALS [ 'TL_CONFIG' ] [ $ objWidget -> rgxp . 'Format' ] ; switch ( $ objWidget -> rgxp ) { case 'datim' : $ time = ",\n      timePicker:true" ; break ; case 'time' : $ time = ",\n      pickOnly:\"time\"" ; break ; default : $ time = '' ; } return 'new Picker.Date($$("#ctrl_' . $ objWidget -> id . '"), {
            draggable:false,
            toggle:$$("#toggle_' . $ objWidget -> id . '"),
            format:"' . Date :: formatToJs ( $ strFormat ) . '",
            positionOffset:{x:-197,y:-182}' . $ time . ',
            pickerClass:"datepicker_bootstrap",
            useFadeInOut:!Browser.ie,
            startDay:' . $ translator -> translate ( 'weekOffset' , 'MSC' ) . ',
            titleFormat:"' . $ translator -> translate ( 'titleFormat' , 'MSC' ) . '"
        });' ; }
Build the date picker string.

@param Widget $objWidget The widget instance to generate the date picker string for.

@return string

@SuppressWarnings(PHPMD.Superglobals)
@SuppressWarnings(PHPMD.CamelCaseVariableName)
Build the date picker string .