PlotPyStack / guidata

Python library generating graphical user interfaces for easy dataset editing and display
https://pypi.python.org/pypi/guidata
BSD 3-Clause "New" or "Revised" License
61 stars 18 forks source link

DateItem and DateTimeItem: added 'format' parameter for formatting #55

Closed robochat closed 1 year ago

robochat commented 2 years ago

I found that DateTime widgets were displaying datetimes as "09/10/2022 07:59" on my system which meant that I couldn't see the seconds. I also prefer to use iso-formatted time when possible. This pull request adds the parameter 'format' to DateItem and DateTimeItem classes so that a custom format can be optionally provided. For instance:

starttime = DateTimeItem("start",format="yyyy-MM-ddTHH:mm:ss")

PierreRaybaut commented 1 year ago

This has been merged manually due to many API changes since the creation of this PR.

Thanks for your contribution. And sorry for the delay.