cancel
Showing results for 
Search instead for 
Did you mean: 

Rest the value in MaskInput

s_kancherla
Participant
0 Kudos

hi,

I am using a MaskInput in Dialog, and would like to clear the value before the Dialog opens.

What I have done so far,

used setValue(null) and

cleared the value data binding value using, oModel.setProperty("/maskIpt", "");

When the element is rendered, it shows the place holder String, it means that the value of the MaskInput is cleared,

The problem

is when I start typing the previous value is displayed.

Is there a method to reset the input, to display the initial value with the placeholder characters (eg: ____-____) every time I open the dialog?

Thank you

Sudhir Kancherla

Accepted Solutions (1)

Accepted Solutions (1)

saivellanki
Active Contributor
0 Kudos

Hi Sudhir,

Yes, I do see that issue.

One solution would be destroying your dialog using afterClose event and re-create the Mask Input control.

Will this sample help? MaskInput

Regards,

Sai Vellanki.

s_kancherla
Participant
0 Kudos

Hi Sai Vellanki,

Since I am using the dialog as fragment, destroying the dialog caused error when trying to reopen the dialog. But deleting the dialog object after destroying dialog solved the issue.

Thank you for a prompt answer

regards

Sudhir Kancherla

former_member182862
Active Contributor
0 Kudos

You do not need to destroy the dialog.

You just have to setMask before dialog open

JS Bin - Collaborative JavaScript Debugging

Thanks

-D

Answers (0)