I'm using an Edit Box control to display a date field. When the XPage is saved, I would like to save the date only (now both date and time are being saved). Is there any way of doing this?
Here is my code:
<xp:inputText id="dateReparatur" value="#{document1.dateReparatur}">
<xp:this.converter>
<xp:convertDateTime type="date" dateStyle="long">
</xp:convertDateTime>
</xp:this.converter>
<xp:dateTimeHelper></xp:dateTimeHelper>
</xp:inputText></xp:td>
UPDATE: I have now implemented the following code:
var dt = currentDocument.getItemValueDateTime("dateReparatur");
var dateonly = dt.getDateOnly();
currentDocument.replaceItemValue("dateReparatur",dateonly);
This gives me the date only, however in Notes the field type is now text rather than Date/Time, which is what I was hoping for.