Skip to content
Permalink
Browse files

Datepicker: Remove support for setting options via custom attributes.

  • Loading branch information...
scottgonzalez committed Nov 27, 2012
1 parent 22bd9fc commit 7c53af0abc9d0c5b2ae1bcad30d01b7e2e441b75
Showing with 2 additions and 15 deletions.
  1. +2 −15 ui/jquery.ui.datepicker.js
@@ -139,28 +139,15 @@ $.extend(Datepicker.prototype, {
* @param settings object - the new settings to use for this date picker instance (anonymous)
*/
_attachDatepicker: function(target, settings) {
// check for settings on the control itself - in namespace 'date:'
var attrName, attrValue, nodeName, inline, inst,
inlineSettings = null;
for (attrName in this._defaults) {
attrValue = target.getAttribute('date:' + attrName);
if (attrValue) {
inlineSettings = inlineSettings || {};
try {
inlineSettings[attrName] = eval(attrValue);
} catch (err) {
inlineSettings[attrName] = attrValue;
}
}
}
var nodeName, inline, inst;
nodeName = target.nodeName.toLowerCase();
inline = (nodeName === 'div' || nodeName === 'span');
if (!target.id) {
this.uuid += 1;
target.id = 'dp' + this.uuid;
}
inst = this._newInst($(target), inline);
inst.settings = $.extend({}, settings || {}, inlineSettings || {});
inst.settings = $.extend({}, settings || {});
if (nodeName === 'input') {
this._connectDatepicker(target, inst);
} else if (inline) {

0 comments on commit 7c53af0

Please sign in to comment.
You can’t perform that action at this time.