ui-mask icon indicating copy to clipboard operation
ui-mask copied to clipboard

Change ui-mask format on the fly

Open dickyjayaumbara opened this issue 7 years ago • 7 comments

hey guys, i have probem with chage ui-mask on the fly,

this my component code: <input type="input" ng-model="item.totalKlaim" ui-mask="{{mask}}" ng-keyup="updateCurrencyMask(item.totalKlaim)"/>

and this update function for ui-mask:

$scope.updateCurrencyMask = function(value)
            {
            	if(value != "")
            	{
            		var lengthValue = value.length;

	            	var mask = "Rp ";
	            	var formatNumber = "";

	            	for(var i=0; i<lengthValue; i++)
	            	{
	            		formatNumber += "9";
	            	}

	            	formatNumber = commafy(formatNumber);

	            	$scope.mask = "Rp "+formatNumber;
            	}
            }

ui-mask just detect default "mask", iam cannot update value again after that, can u help me for this case please

dickyjayaumbara avatar Jan 10 '17 09:01 dickyjayaumbara

or other way, how to use ui-mas for unlimited number of currency?

dickyjayaumbara avatar Jan 10 '17 09:01 dickyjayaumbara

Did you ever figure out how to do this?

gophynna avatar Sep 18 '18 21:09 gophynna

I didn't have any work around for the same after downgrading to 1.6.1 it worked

On Wed, Sep 19, 2018, 3:09 AM gophynna [email protected] wrote:

Did you ever figure out how to do this?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/angular-ui/ui-mask/issues/207#issuecomment-422565578, or mute the thread https://github.com/notifications/unsubscribe-auth/AeJUlXhG6UIYJ832R2fv41Y1cVJrU_juks5ucWglgaJpZM4LfMFO .

soumyamishra12 avatar Sep 19 '18 02:09 soumyamishra12

I didn't have any work around for the same after downgrading to 1.6.1 it worked On Wed, Sep 19, 2018, 3:09 AM gophynna @.***> wrote: Did you ever figure out how to do this? — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#207 (comment)>, or mute the thread https://github.com/notifications/unsubscribe-auth/AeJUlXhG6UIYJ832R2fv41Y1cVJrU_juks5ucWglgaJpZM4LfMFO .

Can you show how you implemented your mask? thank you!

gophynna avatar Sep 19 '18 14:09 gophynna

I am using ui-mask same way without tweaking much as shown in ui-mask demo in angular formly page and the 1.6.2 version works perfectly and ng mask also

Regards, Soumya

On Wed, Sep 19, 2018, 8:18 PM gophynna [email protected] wrote:

I didn't have any work around for the same after downgrading to 1.6.1 it worked … <#m_1984108355977040089_> On Wed, Sep 19, 2018, 3:09 AM gophynna @.***> wrote: Did you ever figure out how to do this? — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#207 (comment) https://github.com/angular-ui/ui-mask/issues/207#issuecomment-422565578>, or mute the thread https://github.com/notifications/unsubscribe-auth/AeJUlXhG6UIYJ832R2fv41Y1cVJrU_juks5ucWglgaJpZM4LfMFO .

Can you show how you implemented your mask? thank you!

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/angular-ui/ui-mask/issues/207#issuecomment-422832602, or mute the thread https://github.com/notifications/unsubscribe-auth/AeJUlcNvEjO4jQHYh8IJm5VVNGWxmKtzks5uclkogaJpZM4LfMFO .

soumyamishra12 avatar Sep 19 '18 15:09 soumyamishra12

Will downgrading allow the user to keep typing even after the mask is applied? My problem is that even with a variable for the mask, it will not let input continue once a mask has been applied.

@soumyamishra12

gophynna avatar Sep 20 '18 14:09 gophynna

Can u show the issue in plunker it somewhere if possible

On Thu, Sep 20, 2018, 7:57 PM gophynna [email protected] wrote:

Will downgrading allow the user to keep typing even after the mask is applied? My problem is that even with a variable for the mask, it will not let input continue once a mask has been applied.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/angular-ui/ui-mask/issues/207#issuecomment-423203896, or mute the thread https://github.com/notifications/unsubscribe-auth/AeJUlXpytvss-Yck43htwW_lx01VwreCks5uc6XhgaJpZM4LfMFO .

soumyamishra12 avatar Sep 20 '18 14:09 soumyamishra12