enthought / enthought/traitsui
Qt custom date editor does not update dates when month changes
- Dominant language
- Python
- Stars
- 306
- Forks
- 99
- PR merge metrics
- No merged PRs in 30d
Description
Initially mentioned in #962, the custom DateEditor on Qt and Mac OSX has this weird behaviour where clicking the left and right buttons to switch months do not update the calendar content.
To reproduce:
```
from traits.api import Date, HasTraits
from traitsui.api import UItem, View, DateEditor
class Model(HasTraits):
date = Date()
def default_traits_view(self):
return View(
UItem('date', editor=DateEditor(), style="custom")
)
model = Model(date=None)
if __name__ == '__main__':
model.configure_traits()
```

The issue is observed with Qt 5 (5.12 and 5.14), with both PySide2 and PyQt5, and Mac OSX, but it is _not observed_ on Linux and Windows.
This eventually can also be reproduced using pure Python+Qt code free of traitsui. It is possible that it is an issue with Qt and Mac OSX. This GH issue is for tracking this known bug, and possibly a workaround within TraitsUI / Pyface.
See also this thread on Qt Forum: https://forum.qt.io/topic/116695/qcalendarwidget-does-not-update-calendar-when-month-changes-on-mac-osx
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.