From d1083005b44ec515e12ff09b7523da53442ef72b Mon Sep 17 00:00:00 2001 From: Keith Wood Date: Wed, 23 Jul 2008 10:29:15 +0000 Subject: Fixed 3108 Allow ids with square brackets Fixed 3113 Allow ids with colon or period --- ui/ui.datepicker.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ui/ui.datepicker.js b/ui/ui.datepicker.js index a07a4df55..b0564cb94 100644 --- a/ui/ui.datepicker.js +++ b/ui/ui.datepicker.js @@ -177,7 +177,8 @@ $.extend(Datepicker.prototype, { /* Create a new instance object. */ _newInst: function(target, inline) { - return {id: target[0].id, input: target, // associated target + var id = target[0].id.replace(/([:\[\]\.])/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 inline: inline, // is datepicker inline or not -- cgit v1.2.3