From 02aef7679743fe913feffaf03093f79d13f4365d Mon Sep 17 00:00:00 2001 From: Valeriy Date: Fri, 13 Dec 2013 12:23:46 +0600 Subject: [PATCH] new version 2.0.7 Fix bug with additional keyboard in mask mode --- datetimepicker.jquery.json | 2 +- jquery.datetimepicker.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/datetimepicker.jquery.json b/datetimepicker.jquery.json index daaac6a..14004bb 100644 --- a/datetimepicker.jquery.json +++ b/datetimepicker.jquery.json @@ -20,7 +20,7 @@ "jquery", "touch" ], - "version": "2.0.6", + "version": "2.0.7", "author": { "name": "Chupurnov Valeriy", "email": "chupurnov@gmail.com", diff --git a/jquery.datetimepicker.js b/jquery.datetimepicker.js index e26f20b..e2567cb 100644 --- a/jquery.datetimepicker.js +++ b/jquery.datetimepicker.js @@ -1,5 +1,5 @@ /** - * @preserve jQuery DateTimePicker plugin v2.0.6 + * @preserve jQuery DateTimePicker plugin v2.0.7 * @homepage http://xdsoft.net/jqplugins/datetimepicker/ * (c) 2013, Chupurnov Valeriy. */ @@ -373,9 +373,9 @@ var val = this.value, key = event.which; switch(true){ - case (( key>=KEY0&&key<=KEY9 )||( key>=_KEY0&&key<=_KEY ))||(key==BACKSPACE||key==DEL): + case (( key>=KEY0&&key<=KEY9 )||( key>=_KEY0&&key<=_KEY9 ))||(key==BACKSPACE||key==DEL): var pos = getCaretPos(this), - digit = ( key!=BACKSPACE&&key!=DEL )?String.fromCharCode(key):'_'; + digit = ( key!=BACKSPACE&&key!=DEL )?String.fromCharCode((_KEY0 <= key && key <= _KEY9)? key-KEY0 : key):'_'; if( (key==BACKSPACE||key==DEL)&&pos ){ pos--; digit='_';