aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeith Wood <kbwood.au@gmail.com>2008-07-23 10:29:15 +0000
committerKeith Wood <kbwood.au@gmail.com>2008-07-23 10:29:15 +0000
commitd1083005b44ec515e12ff09b7523da53442ef72b (patch)
tree8965bcfe5466eff1e1d61b288e62790be85a8a0e
parent1f826dc041f74795fd466fd2d46bf0f68df4bcd1 (diff)
downloadjquery-ui-d1083005b44ec515e12ff09b7523da53442ef72b.tar.gz
jquery-ui-d1083005b44ec515e12ff09b7523da53442ef72b.zip
Fixed 3108 Allow ids with square brackets
Fixed 3113 Allow ids with colon or period
-rw-r--r--ui/ui.datepicker.js3
1 files changed, 2 insertions, 1 deletions
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