In Adobe AEM, I have a CQ dialog (using Granite UI) that has a datepicker inside of it. It looks like this when viewed in the CQ dialog:
The problem occurs whenever I set a date, and save the contents of the dialog:
When I do this, I can't set the date property back to blank again. If I open the dialog and remove the date inside of this field and click save, the property still stays there.
This is an except of my cq dialog's content.xml file which contains the datepicker:
<startdate
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/form/datepicker"
displayedFormat="YYYY-MM-DD"
emptyText="YYYY-MM-DD"
fieldDescription="If limited by a start date, add a start date value. (YYYY-MM-DD)"
fieldLabel="Start Date"
name="./startdate"
storedFormat="YYYY-MM-DD"/>
Why doesn't it save the property when I set it to blank and how do I fix it?
---------EDIT----------
I found that even if I don't put the delete suffixes as @nateyolles places in his answer, the dialog does delete the dates when it is in full-screen mode. It still does not work when the cq dialog is NOT in full screen mode. Either way, I'm sure that this is a bug in AEM.