diff options
author | Fabio Bas <ctrlaltca@gmail.com> | 2013-11-24 23:19:56 +0100 |
---|---|---|
committer | Fabio Bas <ctrlaltca@gmail.com> | 2013-11-24 23:19:56 +0100 |
commit | d479953d132149cf0b3315069a5126afb409d5f2 (patch) | |
tree | 5128fdf8c4e1f658ea508d5452389241ecc8dbee /framework/Web | |
parent | 1006ccbff7faf3e9d1ec9b607a2ba30d090ecc16 (diff) |
Fixed DataTypeValidator for dates
Diffstat (limited to 'framework/Web')
-rw-r--r-- | framework/Web/Javascripts/source/prado/prado.js | 12 | ||||
-rw-r--r-- | framework/Web/Javascripts/source/prado/validator/validation3.js | 2 |
2 files changed, 1 insertions, 13 deletions
diff --git a/framework/Web/Javascripts/source/prado/prado.js b/framework/Web/Javascripts/source/prado/prado.js index 96f439b3..59bf433b 100644 --- a/framework/Web/Javascripts/source/prado/prado.js +++ b/framework/Web/Javascripts/source/prado/prado.js @@ -1023,18 +1023,6 @@ jQuery.extend(String.prototype, { + ((digits > 0) ? "." + m[7] : ""); var num = parseFloat(cleanInput); return (isNaN(num) ? null : num); - }, - - /** - * Converts the string to a date by finding values that matches the - * date format pattern. - * @function {Date} ? - * @param {string} format - Date format pattern, e.g. MM-dd-yyyy - * @returns Date extracted from the string - */ - toDate : function(format) - { - return Date.SimpleParse(this, format); } }); diff --git a/framework/Web/Javascripts/source/prado/validator/validation3.js b/framework/Web/Javascripts/source/prado/validator/validation3.js index a99146e6..aaaa1c27 100644 --- a/framework/Web/Javascripts/source/prado/validator/validation3.js +++ b/framework/Web/Javascripts/source/prado/validator/validation3.js @@ -1134,7 +1134,7 @@ Prado.WebUI.TBaseValidator = jQuery.klass(Prado.WebUI.Control, return value; else { - var value = string.toDate(string, this.options.DateFormat); + var value = Date.SimpleParse(string, this.options.DateFormat); if(value && typeof(value.getTime) == "function") return value.getTime(); else |