linux64 gtk2 lazarus (2.2.4)
TDateTimePIcker calendar not responding in Linux gtk2。
the existing calendar dropdowns in tkDate mode do not respond to mouse clicks or keystrokes
How to solve this problem? Ask for help。
I did take a quick look, apparently gtk2 does not like explicit popup. Please do the following:
1. Open ../components/datetimectrls/datetimepicker.pas
2. Search for pmExplicit, you should find it in TDTCalendarForm's constructor
3. Replace
//...
if Assigned(DTPickersParentForm) then begin
DTPickersParentForm.AddHandlerOnVisibleChanged(@VisibleOfParentChanged);
DTPickersParentForm.FreeNotification(Self);
{PopupParent := DTPickersParentForm; //<- this one
PopupMode := pmExplicit;}
PopupMode := pmNone; //<- with this one
end else
PopupMode := pmAuto;
//...
4. Rebuild the IDE
This will work with gtk2. For a more generic solution, an ifdef lclgtk2 needed.