code: @Override
  	public void doRender(final WComponent component, final WebXmlRenderContext renderContext) {
  		WPartialDateField dateField = (WPartialDateField) component;
  		XmlStringBuilder xml = renderContext.getWriter();
  		boolean readOnly = dateField.isReadOnly();
  
  		String date = formatDate(dateField);
  
  		xml.appendTagOpen("ui:datefield");
  		xml.appendAttribute("id", component.getId());
  		xml.appendOptionalAttribute("class", component.getHtmlClass());
  		xml.appendOptionalAttribute("track", component.isTracking(), "true");
  		xml.appendOptionalAttribute("hidden", dateField.isHidden(), "true");
  		xml.appendOptionalAttribute("date", date);
  		if (readOnly) {
  			xml.appendAttribute("readOnly", "true");
  		} else {
  			xml.appendAttribute("allowPartial", "true");
  			xml.appendOptionalAttribute("disabled", dateField.isDisabled(), "true");
  			xml.appendOptionalAttribute("required", dateField.isMandatory(), "true");
  			xml.appendOptionalAttribute("toolTip", dateField.getToolTip());
  			xml.appendOptionalAttribute("accessibleText", dateField.getAccessibleText());
  			WComponent submitControl = dateField.getDefaultSubmitButton();
  			String submitControlId = submitControl == null ? null : submitControl.getId();
  			xml.appendOptionalAttribute("buttonId", submitControlId);
  		}
  
  		xml.appendClose();
  
  		if (date == null) {
  			xml.appendEscaped(dateField.getText());
  		}
  
  		if (!readOnly) {
  			DiagnosticRenderUtil.renderDiagnostics(dateField, renderContext);
  		}
  		xml.appendEndTag("ui:datefield");
  	}
docs: Paints the given WPartialDateField.
  
  @param component the WPartialDateField to paint.
  @param renderContext the RenderContext to paint to.