Opened 2 years ago
Closed 23 months ago
#3560 closed Defect (fixed)
input/date and output/date are not compatible
| Reported by: | cash | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Elgg 1.8.0 |
| Component: | UI/UX | Version: | Github Master |
| Severity: | minor | Keywords: | |
| Cc: | brett@… | Difficulty: | moderate |
Description
input/date with the datepicker - you end up with a string representation of the date. output/date expects a timestamp. This requires the saving action to convert the string to a timestamp before saving. Maybe display the string representation but submit the timestamp representation through a hidden field (sort of how tinymce works).
Also, the date views do not work with dates before Jan 1, 1970.
Change History (2)
comment:1 Changed 2 years ago by ewinslow
comment:2 Changed 23 months ago by cash
- Resolution set to fixed
- Status changed from new to closed
Fixed in merging pull request, commit [e7d0bf44e4f9958b211f0a010e7c70ea0cae7da7]
Note: See
TracTickets for help on using
tickets.

Might be worth mentioning that HTML5 type=date inputs only accept dates in YYYY-MM-DD format. This works for dates before 1970-01-01.
output/date I think should be able to accept any parsable string as well as a timestamp.