protected String resolveMask(DatePicker component, String mask) {
        if (!"true".equals(mask)) {
            return mask;
        }
        String patternMask = component.convertPattern(component.calculatePattern());
        switch (component.getSelectionMode()) {
            case "multiple":
                throw new FacesException("Mask is not supported on selectionMode multiple");
            case "range":
                return patternMask + " " + component.getRangeSeparator() + " " + patternMask;
            default:
                return patternMask;
        }
    }
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