]> source.dussan.org Git - jquery-ui.git/commitdiff
Datepicker - Fixed #4969 - Datepicker cannot change values of fields named with speci...
authorKeith Wood <kbwood.au@gmail.com>
Fri, 27 Nov 2009 06:08:13 +0000 (06:08 +0000)
committerKeith Wood <kbwood.au@gmail.com>
Fri, 27 Nov 2009 06:08:13 +0000 (06:08 +0000)
ui/jquery.ui.datepicker.js

index fa2c701a02d3481d33a372e7f4263cd0315a7007..9de0e8ce5fe96146b25afce50ce34929a325c797 100644 (file)
@@ -159,7 +159,7 @@ $.extend(Datepicker.prototype, {
 
        /* 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