Fixed 3108 Allow ids with square brackets

Fixed 3113 Allow ids with colon or period
This commit is contained in:
Keith Wood
2008-07-23 10:29:15 +00:00
parent 1f826dc041
commit d1083005b4

View File

@@ -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