Jump to content

change InputMask.Mask at runtime


RobYost

Recommended Posts

Thank You.

 

I'm sorry I (and other people) keep asking questions like this and the answer always seems to be some sort of JavaScript code.

 

It seems it would be easier for you if when we ask a question like this you add this line of code to the event (in this case OnSelect) then no one will ask that question again.

 

If that is too hard would one of you write an example of how to override the OnSelect (or any of them) event and we (your customers) can keep a wiki of descendant components?

  • Like 1
Link to comment
Share on other sites

  • 3 years later...
On 9/20/2017 at 9:29 AM, Marlon Nardi said:
I have developed a free component to facilitate this, if you are interested in FSMask and FSDBMask, you can also change it and add it to your wiki.  ;)

 

 

 

 

 

 

On 9/20/2017 at 1:38 AM, RobYost said:

Thank You.

 

I'm sorry I (and other people) keep asking questions like this and the answer always seems to be some sort of JavaScript code.

 

It seems it would be easier for you if when we ask a question like this you add this line of code to the event (in this case OnSelect) then no one will ask that question again.

 

If that is too hard would one of you write an example of how to override the OnSelect (or any of them) event and we (your customers) can keep a wiki of descendant components?

 

On 9/19/2017 at 1:05 PM, Sherzod said:

Hi,

 

At the moment you can try to use this approach:

 

For example:


UniEdit1.JSInterface.JSCode('$("#"+'#1'.inputEl.id).inputmask("99/99/99");');

procedure TMainForm.UniButton1Click(Sender: TObject);
begin
UniEdit1.JSInterface.JSCode('$("#"+'#1'.inputEl.id).inputmask("99/99/99");');
UniEdit1.SetFocus;
end;

procedure TMainForm.UniButton2Click(Sender: TObject);
begin
UniEdit1.JSInterface.JSCode('$("#"+'#1'.inputEl.id).inputmask("99-99-99");');
UniEdit1.SetFocus;
end;

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