protected void initializeDefaults(FacesContext context, DatePicker datePicker) {
        String pattern = datePicker.getPattern() == null ? datePicker.calculatePattern() : datePicker.getPattern();

        if (datePicker.isShowTimeWithoutDefault() == null) {
            Class<?> type = datePicker.getValueType();

            if (type != null) {
                datePicker.setShowTime(LocalDateTime.class.isAssignableFrom(type));
            }
            else {
                datePicker.setShowTime(CalendarUtils.hasTime(pattern));
            }
        }

        if (datePicker.isTimeOnlyWithoutDefault() == null) {
            Class<?> type = datePicker.getValueType();

            if (type != null) {
                datePicker.setTimeOnly(LocalTime.class.isAssignableFrom(type));
            }
        }

        if (datePicker.isShowSecondsWithoutDefault() == null) {
            datePicker.setShowSeconds(pattern.contains("s") || pattern.contains("S"));
        }

        if (datePicker.isShowMillisecondsWithoutDefault() == null) {
            datePicker.setShowMilliseconds(pattern.contains("S"));
        }
    }
Initializes the default settings for the DatePicker component based on its pattern and value type.

@param context the FacesContext instance
@param datePicker the DatePicker component to initialize
primefaces/src/main/java/org/primefaces/component/datepicker/DatePickerRenderer.java