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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...