JQuery Validate and datepicker format issue

JQuery Validate and datepicker format issue

Hi,

I recently migrated my ASP.NET MVC 2 webapp to MVC 3. Within this migration I also switched from MicrosoftMVCValidation to jquery.validate. Scott Guthrie recently presented a library for globalization in jquery on his blog. (http://weblogs.asp.net/scottgu/archive/2010/06/10/jquery-globalization-plugin-from-microsoft.aspx)

I integrated the globalization plugin and also used the datepicker. When I now open up a page, having jquery.validate and also the datepicker from the globalization package in, I get an error for this line:

  1. source = source.replace(new RegExp("\\{" + i + "\\}""g"), n);     

source.replace is not a function. If I wrap that line with if(typeof(source) == "string") { } the error disappears. BUT the main problem is the following: The format of my date in the textbox changes also. Instead of having the short date like "11/17/2010" I do have "Wed Nov 17 2010 00:00:00 GMT+0100" now, what actually means, the format function isn't working anymore.

Any ideas?

I would be happy, if someone could help me out.