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') . '"
        });';
    }