0

My User will input salary range I want to format it so I use mask But I want to mask my User input value like this

5 000 TL-8 000 TL

maybe my user input 1000 TL-100000 TL

I tried this

$("#WageRange").mask("99999 TL - 99999 TL");

but this not work very well,it is less

and if user don't click enter it does not add TL to end sometimes it give that result 8000TL-9000 (it should do this 8 000 TL -9 000 TL)

I don't want use any third party plugin

kk.
  • 3,747
  • 12
  • 36
  • 67
user1688401
  • 1,851
  • 8
  • 47
  • 83

1 Answers1

0
$("#WageRange").mask("0000TL - 0000r", {
      translation: {
        'r': {
          pattern: /[0-9]TL/,
          fallback: 'TL'
        }
      }
    });


This should work.
Hema Nandagopal
  • 668
  • 12
  • 35