BUG-date control not formating dates
FabienLelaquais opened this issue · 0 comments
Description
I cannot seem to be able to display a non-editable date without time.
How to reproduce
A code fragment
from taipy.gui import Gui
from datetime import date
my_date = date(1789, 7, 14)
page = """# Formatting date
<|{my_date}|date|not editable|format=E, dd MMM|>
"""
Gui(page).run()
Being not editable
, this date control does not use the without_time
property.
However, usung the format
property (with Python-like placeholders or taken from Javascript's SimpleDateFormat
) don'help either.
I tried using a regular text field (<|{my_date}|text|format=d MMM|>
) that DOES work although I could not find the doc on this one.
Expected behavior
The format should be documented, but is not (the doc says: "see below" and there's nothing).
I would recommend that if the control is not editable, with the without_time
property set to True, and no format
value, then we provide a default formatting on our own (such as YYYY-MM-DD).