Jump to content

Ario.Paxaz

Recommended Posts

@Ario.Paxaz

Try, I don't know if this plugin works correctly at all.

 

But as you asked, I was able to show it on UniEdit1.

1. Remove this code:

procedure TMainForm.UniFormCreate(Sender: TObject);
begin
  //UniEdit1.ClientEvents.ExtEvents.Values['beforerender'] :=
  //  'function beforerender(sender, eOpts){  sender.addClass("date");}';
end;

2. Remove:

function click(sender, eOpts)
{
      //    e.preventDefault();
      //  $.dateSelect.show({
      //      element: $(this)
      //  });
}

3. CustomCSS:

.date-select {
    z-index: 100000;
}

4. CustomFiles:

files/persian-date.js
files/persian-selector.js
files/persian-selector.css
https://cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.1.11/jquery.mousewheel.min.js

5. UniEdit1.ClientEvents.ExtEvents ->

function afterrender(sender, eOpts)
{
    $('#' + sender.inputEl.getId()).on('click', function(e) {
        e.preventDefault();
		$.dateSelect.show({
		    element: '#' + sender.inputEl.getId()
        });
    });
}

 

Link to comment
Share on other sites

9 minutes ago, Ario.Paxaz said:

Where should I write Afterrender for UnimEdit?

I don't know if this plugin is adapted for mobile.

But you can try to use this event:

...

function painted(sender, eOpts)
{
    $('#' + sender.inputElement.getId()).on('click', function(e) {
        e.preventDefault();
		$.dateSelect.show({
		    element: '#' + sender.inputElement.getId()
        });
    });
}

 

  • Like 1
Link to comment
Share on other sites

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...