Re: Date properties

Ralf Schlatterbeck <[email protected]> Fri, 14 Feb 2025 12:00:46 +0100
Newsgroups gmane.comp.bug-tracking.roundup.devel
Message-ID <[email protected]>
On Fri, Feb 14, 2025 at 10:32:14AM +0100, Ralf Schlatterbeck wrote:
> 
> But maybe we should make the intended time format (if we need only the
> date or date + time) part of the attributes of the 'Date' property
> itself. So similar to a Link property where we have additional
> parameters like "do_journal" or "rev_multilink" we could add a "type"
> parameter to the Date property. This can then be used by the field()
> call in the templates for selecting the proper html5 <input> type. I
> would not tie this to the html5 input-type, though, rather use 'date'
> vs. 'datetime' similar to python's datetime implementation (which has
> 'date' and 'datetime' objects). I think the default should be 'datetime'
> because that is compatible with the current behavior.

Since there would be only two values for 'type' ('date' and 'datetime')
a boolean 'display_time' (with default True) or similar might be better.

Ralf
-- 
Dr. Ralf Schlatterbeck                  Tel:   +43/2243/26465-16
Open Source Consulting                  www:   www.runtux.com
Reichergasse 131, A-3411 Weidling       email: [email protected]