M.Ammar Posted June 28, 2019 Share Posted June 28, 2019 Hi I have 3 points regarding UnimDatePicker 1- TUnimDatePicker have a bug sometimes show selection menu at year 2039 although the selected date as in the screen shoot show 27/06/2019, this mainly happen after the form leases focus by showing a side menu or something like that. 2- how can I prevent typing into TUnimDatePicker only allow selection 3- if any one can help me how to translate buttons and months names to Arabic. Regards Link to comment Share on other sites More sharing options...
Sherzod Posted June 28, 2019 Share Posted June 28, 2019 Hi, 9 minutes ago, M.Ammar said: 2- how can I prevent typing into TUnimDatePicker only allow selection procedure TMainmForm.UnimFormCreate(Sender: TObject); begin UnimDatePicker1.JSInterface.JSConfig('editable', [False]); end; 1 Link to comment Share on other sites More sharing options...
Sherzod Posted June 28, 2019 Share Posted June 28, 2019 13 minutes ago, M.Ammar said: 3- if any one can help me how to translate buttons names to Arabic. http://forums.unigui.com/index.php?/topic/6067-donecancel-button-can-modify-to-another-text/&do=findComment&comment=56210 1 Link to comment Share on other sites More sharing options...
M.Ammar Posted June 30, 2019 Author Share Posted June 30, 2019 On 6/28/2019 at 1:52 PM, Sherzod said: http://forums.unigui.com/index.php?/topic/6067-donecancel-button-can-modify-to-another-text/&do=findComment&comment=56210 thank you for your help as always you save me, can you please give the code for this at runtime to change with language function afterCreate(sender) { sender.getPicker().getDoneButton().setText("Done!"); sender.getPicker().getCancelButton().setText("Cancel!") } Link to comment Share on other sites More sharing options...
Sherzod Posted June 30, 2019 Share Posted June 30, 2019 47 minutes ago, M.Ammar said: thank you for your help as always you save me, can you please give the code for this at runtime to change with language Thank you! Can you try this approach? function afterCreate(sender) { var me=sender.getPicker(); if (me && !Ext.isWindows) { me.getDoneButton().setText("Done!"); me.getCancelButton().setText("Cancel!"); const newMonthsNames=['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12']; month=me.getSlots().find(x => {return x.name == "month"}); if (month) {month.data.forEach(function(m, i){m.text=newMonthsNames[i]})} } } 1 Link to comment Share on other sites More sharing options...
M.Ammar Posted June 30, 2019 Author Share Posted June 30, 2019 working perfect as expected One last thing, i need this code at Runtime so I can switch Back to defaults when language is English. Best Regards Link to comment Share on other sites More sharing options...
Sherzod Posted June 30, 2019 Share Posted June 30, 2019 5 hours ago, M.Ammar said: One last thing, i need this code at Runtime so I can switch Back to defaults when language is English. I will try to analize. 1 Link to comment Share on other sites More sharing options...
x11 Posted October 22, 2020 Share Posted October 22, 2020 uniGUI 1537, unimDatePicker error: me.getDoneButton is not a function function afterCreate(sender) { var me=sender.getPicker(); if (me && !Ext.isWindows) { me.getDoneButton().setText("OK"); me.getCancelButton().setText("X") } } Link to comment Share on other sites More sharing options...
Sherzod Posted October 22, 2020 Share Posted October 22, 2020 We will check it. Link to comment Share on other sites More sharing options...
Sherzod Posted October 22, 2020 Share Posted October 22, 2020 2 hours ago, x11 said: Works for me. Link to comment Share on other sites More sharing options...
x11 Posted October 23, 2020 Share Posted October 23, 2020 проверьте этот тестовый пример у себя на Delphi Rio + uniGUI 1537 uniGUI_Layout1_DatePicker.zip Link to comment Share on other sites More sharing options...
x11 Posted October 23, 2020 Share Posted October 23, 2020 1. Open DevTools. 2. Add new vierual device. 3. Add custom device: UserAgent: Mozilla/5.0 (Linux; <Android Version>; <Build Tag etc.>) AppleWebKit/<WebKit Rev> (KHTML, like Gecko) Chrome/<Chrome Rev> Mobile Safari/<WebKit Rev> Link to comment Share on other sites More sharing options...
x11 Posted October 24, 2020 Share Posted October 24, 2020 On 10/22/2020 at 7:20 PM, Sherzod said: Works for me. I tested on 2 smartphones in Firefox and got this error Link to comment Share on other sites More sharing options...
Sherzod Posted October 24, 2020 Share Posted October 24, 2020 1 hour ago, x11 said: I tested on 2 smartphones in Firefox and got this error On 10/23/2020 at 4:45 PM, x11 said: 1. Open DevTools. 2. Add new vierual device. 3. Add custom device: UserAgent: Mozilla/5.0 (Linux; <Android Version>; <Build Tag etc.>) AppleWebKit/<WebKit Rev> (KHTML, like Gecko) Chrome/<Chrome Rev> Mobile Safari/<WebKit Rev> Hello, Then try this: 1. type TUniPlatforms = set of TUniPlatform; 2. public { Public declarations } uPlat: TUniPlatforms; 3. procedure TMainmForm.UnimFormCreate(Sender: TObject); begin uPlat := UniApplication.UniPlatform; if (upMobile in uPlat) then UnimDatePicker1.Picker := dptEdge; end; 1 Link to comment Share on other sites More sharing options...
x11 Posted October 24, 2020 Share Posted October 24, 2020 да, помогло, спасибо 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now