Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- change: function(self, newValue) {
- var numbers = '0123456789';
- if(newValue && newValue.length == 2 && ~numbers.indexOf(newValue.charAt(1))) {
- //Введено 2 символа, и второй число. Значит пытаются ввести код МКБ
- var latChar = 'qwertyuiopasdfghjklzxcvbnm';
- var cirChar = 'йцукенгшщзфывапролдячсмить';
- //Индекс первого символа
- var index = cirChar.indexOf(newValue.charAt(0));
- if(index != -1) {
- var newValueStr = latChar.charAt(index) + newValue.substring(1);
- self.setRawValue(newValueStr);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement