Opened 14 years ago
Closed 14 years ago
#1736 closed defect (wontfix)
SortableTable: parsing dates can be incorrect.
Reported by: | guest | Owned by: | Tom Trenka |
---|---|---|---|
Priority: | high | Milestone: | 0.9 |
Component: | Widgets | Version: | 0.4 |
Keywords: | SortableTable, date | Cc: | |
Blocked By: | Blocking: |
Description
The SortableTable? has a bug in the parsing of the "Date" columns. In fact when you pick the value of a column (for exemple "10/08/2006"), the string is converted in a Date without using the FORMAT attribute. But when you write the table, the Date object is converted into String using the FORMAT attribute. In the method 'parseDataFromTable' on row 310, you have the code:
if(type == String){ o[field]=val; } else { if (val!=null){ o[field]=new type(val); } else { o[field]=new type(); //let it use the default. } }
So if the type is 'Date' the string is converted into Date with a 'new Date(val)'. I think you must here use the dojo.date.parse with the format attribute to parse the string correctly.
Change History (3)
comment:1 Changed 14 years ago by
Milestone: | → 0.5 |
---|---|
Owner: | changed from bill to Tom Trenka |
comment:2 Changed 14 years ago by
Priority: | high → normal |
---|---|
Summary: | SortableTable on columns of Date type → SortableTable: parsing dates can be incorrect. |
Will double check in Filtering but IIRC Adam set it up to use the localization stuff. The original (Sortable) uses the native JS date parsing to figure out what the value of the column is.
comment:3 Changed 14 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
Closing this with the removal of Sortable from the codebase, and with the filing of the same basic bug on Filtering.
SortableTable? is deprecated so this won't be fixed, but assigning to Tom just in case the same problem exists in FilterTable? (sp?)