comparison doc/customizing.txt @ 8300:b99e76e76496

Make native date and number elements configurable Now for Number() and Integer() properties the browser-native number format can be configured with the use_browser_number_input config item in seciont [web]. The default is 'yes'. For Date() properties the config item is use_browser_date_input (also in section [web]) but the default is 'no'. In addition when defining Date() properties, these now have a parameter 'display_time' which defaults to 'yes' and a 'format' parameter which defaults to None. These set defaults for the field() method of the DateHTMLProperty which have the same parameters (but the display_time parameter of field() takes a boolean, not 'yes'/'no').
author Ralf Schlatterbeck <rsc@runtux.com>
date Wed, 19 Feb 2025 12:38:06 +0100
parents 2bf0c4e7795e
children 3f43db05aa11
comparison
equal deleted inserted replaced
8299:43899d99fc4d 8300:b99e76e76496
88 <tr> 88 <tr>
89 <th>Due Date</th> 89 <th>Due Date</th>
90 <td tal:content="structure context/due_date/field" /> 90 <td tal:content="structure context/due_date/field" />
91 </tr> 91 </tr>
92 92
93 If you want to show the date and time for due_date then do this instead:: 93 If you want to show only the date part of due_date then do this instead:
94 94
95 <tr> 95 <tr>
96 <th>Due Date</th> 96 <th>Due Date</th>
97 <td tal:content="structure context/due_date/field_time" /> 97 <td tal:content="structure python:context.due_date.field(display_time=False)" />
98 </tr> 98 </tr>
99 99
100 3. Add the property to the ``issue.index.html`` page:: 100 3. Add the property to the ``issue.index.html`` page::
101 101
102 (in the heading row) 102 (in the heading row)

Roundup Issue Tracker: http://roundup-tracker.org/