Jump to content

Recommended Posts

Posted

Hi

 

I have  UniDateTimePicker that created in runtime.How to add below code?

function beforeInit(sender, config)
{
  sender.plugins = [new Ext.ux.JalaliDatePlugin]
}

0tty_js.jpgBest Regards.

Posted

Hi,

YourComponent.ClientEvents.UniEvents.Values['beforeInit'] := 'function (sender, config) {sender.plugins = [new Ext.ux.JalaliDatePlugin]}');

Best regards.

  • Upvote 1
Posted

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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...