erich.wanker Posted December 11, 2022 Share Posted December 11, 2022 how can i show pickerfield when click on uniUniDBDateTimePicker ( in textfield AND Icon .. not just Icon) .. ThanX Erich Quote Link to comment Share on other sites More sharing options...
Sherzod Posted December 11, 2022 Share Posted December 11, 2022 Hello, 35 minutes ago, erich.wanker said: how can i show pickerfield when click on uniUniDBDateTimePicker ( in textfield AND Icon .. not just Icon) .. When the component gets focus? Quote Link to comment Share on other sites More sharing options...
erich.wanker Posted December 12, 2022 Author Share Posted December 12, 2022 i search a silution like if uniUniDBDateTimePicker.onclick -> then show Pickerfield The actual situation is: if just Icon of uniUniDBDateTimePicker.onclick -> then show Pickerfield PS...if it works with a onFocus -solution - i will take it 😉 Nice greetings Erich Quote Link to comment Share on other sites More sharing options...
Sherzod Posted December 12, 2022 Share Posted December 12, 2022 Ok. I will give a solution a bit later. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted December 12, 2022 Share Posted December 12, 2022 36 minutes ago, erich.wanker said: i search a silution like if uniUniDBDateTimePicker.onclick -> then show Pickerfield Try this approach: procedure TMainForm.UniFormCreate(Sender: TObject); begin with UniDateTimePicker1 do begin if Kind in [tUniDate, tUniTime] then ClientEvents.ExtEvents.Values['click'] := 'function click(sender, eOpts){sender.getTriggers().picker.onClick()}' else begin ClientEvents.ExtEvents.Values['date.click'] := 'function date.click(sender, eOpts){sender.getTriggers().picker.onClick()}'; ClientEvents.ExtEvents.Values['time.click'] := 'function time.click(sender, eOpts){sender.getTriggers().picker.onClick()}'; end; end; end; 1 Quote Link to comment Share on other sites More sharing options...
erich.wanker Posted December 12, 2022 Author Share Posted December 12, 2022 Thak you very much - it works well 🙂 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.