From d479953d132149cf0b3315069a5126afb409d5f2 Mon Sep 17 00:00:00 2001 From: Fabio Bas Date: Sun, 24 Nov 2013 23:19:56 +0100 Subject: Fixed DataTypeValidator for dates --- framework/Web/Javascripts/source/prado/prado.js | 12 ------------ .../Web/Javascripts/source/prado/validator/validation3.js | 2 +- 2 files changed, 1 insertion(+), 13 deletions(-) (limited to 'framework/Web/Javascripts/source') 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 -- cgit v1.2.3