@Override
    public Object getConvertedValue(FacesContext context, UIComponent component, Object value) throws ConverterException {
        DatePicker datePicker = (DatePicker) component;
        String submittedValue = (String) value;

        if (isValueBlank(submittedValue)) {
            return null;
        }

        String selectionMode = datePicker.getSelectionMode();
        switch (selectionMode) {
            case "multiple":
                String[] parts = submittedValue.split(",");
                List<Object> multi = new ArrayList<>();
                for (String part : parts) {
                    multi.add(super.getConvertedValue(context, component, part));
                }

                return multi;
            case "range":
                List<String> rangeStr = CalendarUtils.splitRange(submittedValue, datePicker.calculatePattern(),
                        datePicker.getRangeSeparator(), "week".equals(datePicker.getView()));
                List<Object> range = new ArrayList<>();
                if (rangeStr.size() == 2) {
                    for (int i = 0; i < rangeStr.size(); i++) {
                        range.add(super.getConvertedValue(context, component, rangeStr.get(i)));
                    }
                    // #8351 adjust end date to end of day
                    Object end = range.get(1);
                    boolean isDate = end instanceof Date;
                    if (end instanceof LocalDateTime || isDate) {
                        LocalDateTime endDate = isDate
                                ? CalendarUtils.convertDate2LocalDateTime((Date) end)
                                : (LocalDateTime) end;
                        endDate = endDate.plusDays(1).minus(1, ChronoUnit.NANOS);
                        range.set(1, isDate ? CalendarUtils.convertLocalDateTime2Date(endDate) : endDate);
                    }
                }
                return range;
            default:
                return super.getConvertedValue(context, component, value);
        }
    }
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