#1003 closed defect (fixed)
Null or blank dates are not handled reasonably by SortableTable
Reported by: | Owned by: | Tom Trenka | |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | Widgets | Version: | 0.3 |
Keywords: | SortableTable Date null missing | Cc: | |
Blocked By: | Blocking: |
Description
I consider it a defect, you may consider it an enhancement, but the SortableTable? should handle null or blank (missing) values in a Date field in some consistent way, and display these values as a blank. In the current implementation of parseData and parseTable, the Date constructor is called and the default (i.e. Today) is returned.
I suggest that the "null/missing Date represented as a blank" use case is much more common than the need to generate a "Today" (actually "Now") Date value from a null or blank.
SortableTable? methods parseData and parseTable will have to be modified to skip parsing for null or blank Date column values and dojo.date.strftime must be modified to return "" when passed a null or blank object. I haven't looked into it in detail, but sorting on Date fields seems to work fine for missing values with the above patches --- The missing values sort after (greater than) any Date value, although there could be two different preferences about what the default value should be for sorting --- whether a missing date is "before" all other dates, or "after".
I can provide a patch if you'd like, but the required changes are pretty straightforward.
Change History (4)
comment:1 Changed 15 years ago by
comment:2 Changed 15 years ago by
Owner: | changed from anonymous to Tom Trenka |
---|
Will deal with when I do the rewrite.
comment:3 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
This should be handled fine within the replacement widget for Sortable called FilteringTable?.
I meant parseDataFromTable, not parseTable --- in src/widget/html/SortableTable.js