Many improvements.
This commit is contained in:
12
third-party/mexui/Core/Control/Week.js
vendored
12
third-party/mexui/Core/Control/Week.js
vendored
@@ -7,12 +7,14 @@ mexui.util.extend(mexui.Control.Week, mexui.Control.TextInput);
|
||||
// model
|
||||
mexui.Control.Week.prototype.validateInputCallback = function(e, character)
|
||||
{
|
||||
var _int = parseInt(character);
|
||||
return mexui.util.isPositiveIntChar(character);
|
||||
};
|
||||
|
||||
mexui.Control.Week.prototype.validateValueCallback = function(e)
|
||||
{
|
||||
var _int = parseInt(this.getText());
|
||||
|
||||
if(isNaN(_int))
|
||||
return false;
|
||||
|
||||
if(_int < 0 || _int > 51)
|
||||
if(_int < 1 || _int > 52)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user