r3480 committed - Datepicker - Fixed #4969 - Datepicker cannot change values of fields n...

r3480 committed - Datepicker - Fixed #4969 - Datepicker cannot change values of fields n...

Revision: 3480
Author: kbwood.au@gmail.com
Date: Thu Nov 26 22:08:13 2009
Log: Datepicker - Fixed #4969 - Datepicker cannot change values of fields
named with special characters
http://code.google.com/p/jquery-ui/source/detail?r=3480
Modified:
/trunk/ui/jquery.ui.datepicker.js
=======================================
--- /trunk/ui/jquery.ui.datepicker.js    Thu Sep 17 03:39:12 2009
+++ /trunk/ui/jquery.ui.datepicker.js    Thu Nov 26 22:08:13 2009
@@ -159,7 +159,7 @@
    /* Create a new instance object. */
    _newInst: function(target, inline) {
-        var id = target[0].id.replace(/([:\[\]\.\$])/g, '\\\\$1'); // escape
jQuery meta chars
+        var id = target[0].id.replace(/([^A-Za-z0-9_])/g, '\\\\$1'); // escape
jQuery meta chars
        return {id: id, input: target, // associated target
            selectedDay: 0, selectedMonth: 0, selectedYear: 0, // current selection
            drawMonth: 0, drawYear: 0, // month being drawn
--