Set value on focus out and changed signal for datetime widget

The focus out of child widgets must call focus out method.
And we need to connect to the datetime-changed event as DateTime does not call
the __init__ method of Date.

Closes #12020
(grafted from 62934f0e75525d65719bcc83f750d5e9070e4632)

--HG--
branch : 6.0
This commit is contained in:
Cédric Krier
2023-05-30 18:15:43 +02:00
parent fe1972a93b
commit 34751fe8d4
@@ -135,6 +135,8 @@ class DateTime(Date):
child.connect('key_press_event', self.sig_key_press)
child.connect('activate', self.sig_activate)
child.connect('changed', lambda _: self.send_modified())
child.connect('focus-out-event', lambda *a: self._focus_out())
self.entry.connect(self._changed_signal, self.changed)
self.widget.pack_start(self.entry, expand=False, fill=False, padding=0)
@classmethod