Roundup Tracker - Issues

Message8269

Author rouilj
Recipients ThomasAH, ber, ngaba, rouilj, schlatterbeck, stefan, tobias-herp
Date 2025-01-15.01:19:13
Message-id <1736903953.8.0.0498226105654.issue2551390@roundup.psfhosted.org>
In-reply-to
On issue2550858, I proposed replacing a text input and calendar popup for
editing date/time fields with a native input of type date or datetime-local.

This doesn't handle every use case, but I think it handles the majority of
them and addresses all existing issues with the calendar popup.

As part of this change, the field method for DateHTMLProperty class 
changes popcal=True to popcal=False by default. It adds a new:

  field_time()

method for editing date and hours/minutes. Editing seconds only works
if the seconds value is not 0. If you need to add seconds, use a text
input (python:context.datefield.field(type="text", popcal=True)) to
allow editing for the full date format and enable popcal. (See below
for a double clicking action that helps this case.)

The value returned by a datetime-local is set to an RFC3339 format date_time.
The hyperdb Date class accepts input in the form YYYY-mm-DD.HH:MM:SS, but rfc3339
uses 'T' in place of '.'. So hyperdb Date will parse rfc3339 as well.

The field() and field_time() methods force the proper format when date or
datetime-local type is used. Trying to specify a format will result in an
exception.

I also created a javascript file on Thomas's suggestion we support copy/paste.
Including this file (see msg8268) allows copying of date/datetime-local by
double clicking on the input. This changes it to a text input that allows
copying or pasting. Note that this can also allow raw editing of the date/time
for editing/adding seconds. One thing to note is that the value shown is in
RFC3339 format not roundup full date format.

Using the native date/time should be an improvement for tablet users as well.
Note that double-click may not work on touch devices.

This change hides issues with backend the date interval calculations from the
front end, but we still need to handle the backend issues on another ticket.

Anybody want to try the patches?

See also: issue2551260, issue2550935, issue2550527, issue2551124
History
Date User Action Args
2025-01-15 01:19:13rouiljsetrecipients: + rouilj, schlatterbeck, stefan, ber, tobias-herp, ThomasAH, ngaba
2025-01-15 01:19:13rouiljsetmessageid: <1736903953.8.0.0498226105654.issue2551390@roundup.psfhosted.org>
2025-01-15 01:19:13rouiljlinkissue2551390 messages
2025-01-15 01:19:13rouiljcreate