Skip to content

Commit 7c53af0

Browse files
committed
Datepicker: Remove support for setting options via custom attributes.
1 parent 22bd9fc commit 7c53af0

File tree

1 file changed

+2
-15
lines changed

1 file changed

+2
-15
lines changed

ui/jquery.ui.datepicker.js

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -139,28 +139,15 @@ $.extend(Datepicker.prototype, {
139139
* @param settings object - the new settings to use for this date picker instance (anonymous)
140140
*/
141141
_attachDatepicker: function(target, settings) {
142-
// check for settings on the control itself - in namespace 'date:'
143-
var attrName, attrValue, nodeName, inline, inst,
144-
inlineSettings = null;
145-
for (attrName in this._defaults) {
146-
attrValue = target.getAttribute('date:' + attrName);
147-
if (attrValue) {
148-
inlineSettings = inlineSettings || {};
149-
try {
150-
inlineSettings[attrName] = eval(attrValue);
151-
} catch (err) {
152-
inlineSettings[attrName] = attrValue;
153-
}
154-
}
155-
}
142+
var nodeName, inline, inst;
156143
nodeName = target.nodeName.toLowerCase();
157144
inline = (nodeName === 'div' || nodeName === 'span');
158145
if (!target.id) {
159146
this.uuid += 1;
160147
target.id = 'dp' + this.uuid;
161148
}
162149
inst = this._newInst($(target), inline);
163-
inst.settings = $.extend({}, settings || {}, inlineSettings || {});
150+
inst.settings = $.extend({}, settings || {});
164151
if (nodeName === 'input') {
165152
this._connectDatepicker(target, inst);
166153
} else if (inline) {

0 commit comments

Comments
 (0)