summaryrefslogtreecommitdiff
path: root/framework/Web
diff options
context:
space:
mode:
authorFabio Bas <ctrlaltca@gmail.com>2013-11-24 23:19:56 +0100
committerFabio Bas <ctrlaltca@gmail.com>2013-11-26 11:42:53 +0100
commitd564ec922a468fd8e32df4ccbe6e64d66252efc2 (patch)
treefab881f1b5029ae094a20ba2b12314e84ce22f2a /framework/Web
parent0efe21c3095ed07e533da9c33892424136f59f53 (diff)
Fixed DataTypeValidator for dates
Diffstat (limited to 'framework/Web')
-rw-r--r--framework/Web/Javascripts/source/prado/prado.js12
-rw-r--r--framework/Web/Javascripts/source/prado/validator/validation3.js2
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 ff147580..2e3ffbaa 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