A developer is wondering about how to allow blank dates in XTREE...
Very often we need "blanked" dates, i.e. empty dates o "zero dates" (00/00/00), meaning that no date has been captured yet.
In XTREE we haven't found a way to to make it equal to zero or null, once you entered the date.
Like everything else in XTREE, there are many possibilities here, so this may require a couple of passes. But to begin, there are two essentially different approaches to edting dates: as strings, or using the special pop-up date/calendar control. For the standard string version, just specify the
Standard Date Format (D) for the
cformat. This acts like a regular string when it comes to editing, i.e. it does not do any validation. So there is nothing stopping you from entering a blank date, or a date consisting of 00/00/00. Typically though, if you are allowing users to enter dates, you probably want to provide some validation logic to enforce whatever rules you may have. (The only difference between the
D and
S cformat codes is that D attempts to support a variety of date formats when it comes to sorting. (Note that the
cformat code
n controls whether blank dates sort to the bottom or the top.)
The other alternative is to use the pop-up calendar control for date entry, which is enabled by adding the Advanced Coldef Option
InfDef=D. That control does not allow for a blank date, but you can make the date optional by adding O to the InfDef string, i.e.
Infdef=DOIf that doesn't completely address the issue, let's have another round...