Skip to main content
2-Explorer
September 27, 2012
Solved

dateInputComponent - initial value of blank

  • September 27, 2012
  • 1 reply
  • 1743 views

I'm using the wrapper component, "dateInputComponent" to create date boxes on my forms. I need to make the initial value of the date box an empty string or a null value. I've been unable to do this because the component attribute "dateValue" requires a correct date. It won't take "" or null or anything that is not a correct date value. Does anyone know how to make this form field blank?

This is not the same thing as a date attribute on an object that can be set to blank using allClients.xml or the JCA describeProperty tags for JCA tables. This is using the wrappers tags.

<%@ taglib uri=http://www.ptc.com/windchill/taglib/wrappers prefix="w"%>

<w:dateInputComponent name="startDate" id="startDate" required="false" dateValueType="DATE_ONLYE"/>

Best answer by pchateil

Just found a solution for this one:

<%pageContext.setAttribute("date", null);%>

<w:dateInputComponent name="startDate" id="startDate" required="false" dateValueType="DATE_ONLY"  dateValue="${date}"/>

1 reply

pchateil7-BedrockAnswer
7-Bedrock
June 18, 2015

Just found a solution for this one:

<%pageContext.setAttribute("date", null);%>

<w:dateInputComponent name="startDate" id="startDate" required="false" dateValueType="DATE_ONLY"  dateValue="${date}"/>