ariopax Posted June 25, 2016 Posted June 25, 2016 Hi I have UniDateTimePicker that created in runtime.How to add below code? function beforeInit(sender, config) { sender.plugins = [new Ext.ux.JalaliDatePlugin] } Best Regards. Quote
Sherzod Posted June 25, 2016 Posted June 25, 2016 Hi, YourComponent.ClientEvents.UniEvents.Values['beforeInit'] := 'function (sender, config) {sender.plugins = [new Ext.ux.JalaliDatePlugin]}'); Best regards. 1 Quote
ariopax Posted June 25, 2016 Author Posted June 25, 2016 Hi Delphi Developer Thanks,It's worked! Best Regards. Quote
ariopax Posted June 26, 2016 Author Posted June 26, 2016 Hi When I create UniDateTimePicker in runtime,the above code,don't work! Procedure TMainForm.CreateWindow(FormclassName, FormCaption, FormHint: string; FormWidth,FormHeight:Integer); var FormTemp :TUniForm; UniDateTimePicker1: TUniDateTimePicker; Begin FormTemp := TUniFormClass(FindClass('T'+FormclassName)).Create(UniApplication); FormTemp.Caption:=FormCaption; FormTemp.Hint:=FormHint; FormTemp.Width:=FormWidth; FormTemp.Height:=FormHeight; UniDateTimePicker1:=TUniDateTimePicker.Create(FormTemp); UniDateTimePicker1.Parent :=FormTemp; UniDateTimePicker1.Top:=100; UniDateTimePicker1.Left:=100; UniDateTimePicker1.Width:=121; UniDateTimePicker1.ClientEvents.UniEvents.Values['beforeInit']:='function (sender, config) {sender.plugins = [new Ext.ux.JalaliDatePlugin]}'; FormTemp.ShowModal(); End; Best Regards. Quote
ZigZig Posted June 26, 2016 Posted June 26, 2016 You must give a Name to your component (UniDateTimePicker1.Name := ...) 1 Quote
ariopax Posted June 26, 2016 Author Posted June 26, 2016 Hi ZigZig Thanks,It's worked! Best Regards. Quote
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.