code: function(elem) {
  			var inst = this._getInst(elem);
  			if (!$.isEmptyObject(inst)) {
  				inst.selectedDates = [];
  				this.hide(elem);
  				var defaultDate = inst.get('defaultDate');
  				if (inst.options.selectDefaultDate && defaultDate) {
  					this.setDate(elem, (defaultDate || inst.options.calendar.today()).newDate());
  				}
  				else {
  					this._updateInput(elem);
  				}
  			}
  		}
docs: Clear an input and close a popup datepicker.
  @memberof CalendarsPicker
  @param elem {Element} The control to use.
  @example $(selector).datepick('clear')