Create function padLeft with keyup

1

I'm trying to create a function where the user reports a 6-digit number + the year

For example:

  • If I type: 12016 = > 000001/2016
  • If I type: 122016 = > 000012/2016
  • If I type: 1232016 = > 000123/2016
  • If I type: 12342016 = > 001234/2016

And then I have to put a slash before the last 4 numbers to consider as Year .

link

    
asked by anonymous 29.09.2016 / 01:09

0 answers