jquery-src/jquery.calendars.picker.js
function(inst, datesText) {
			if (datesText === inst.lastVal) {
				return;
			}
			inst.lastVal = datesText;
			datesText = datesText.split(inst.options.multiSelect ? inst.options.multiSeparator :
				(inst.options.rangeSelect ? inst.options.rangeSeparator : '\x00'));
			var dates = [];
			for (var i = 0; i < datesText.length; i++) {
				try {
					var date = inst.options.calendar.parseDate(inst.get('dateFormat'), datesText[i]);
					if (date) {
						var found = false;
						for (var j = 0; j < dates.length; j++) {
							if (dates[j].compareTo(date) === 0) {
								found = true;
								break;
							}
						}
						if (!found) {
							dates.push(date);
						}
					}
				}
				catch (e) {
					// Ignore
				}
			}
			dates.splice(inst.options.multiSelect || (inst.options.rangeSelect ? 2 : 1), dates.length);
			if (inst.options.rangeSelect && dates.length === 1) {
				dates[1] = dates[0];
			}
			return dates;
		}
function(inst, datesText) {
			if (datesText === inst.lastVal) {
				return;
			}
			inst.lastVal = datesText;
			datesText = datesText.split(inst.options.multiSelect ? inst.options.multiSeparator :
				(inst.options.rangeSelect ? inst.options.rangeSeparator : '\x00'));
			var dates = [];
			for (var i = 0; i < datesText.length; i++) {
				try {
					var date = inst.options.calendar.parseDate(inst.get('dateFormat'), datesText[i]);
					if (date) {
						var found = false;
						for (var j = 0; j < dates.length; j++) {
							if (dates[j].compareTo(date) === 0) {
								found = true;
								break;
							}
						}
						if (!found) {
							dates.push(date);
						}
					}
				}
				catch (e) {
					// Ignore
				}
			}
			dates.splice(inst.options.multiSelect || (inst.options.rangeSelect ? 2 : 1), dates.length);
			if (inst.options.rangeSelect && dates.length === 1) {
				dates[1] = dates[0];
			}
			return dates;
		}
function ( inst , datesText ) { if ( datesText === inst . lastVal ) { return ; } inst . lastVal = datesText ; datesText = datesText . split ( inst . options . multiSelect ? inst . options . multiSeparator : ( inst . options . rangeSelect ? inst . options . rangeSeparator : '\x00' ) ) ; var dates = [ ] ; for ( var i = 0 ; i < datesText . length ; i ++ ) { try { var date = inst . options . calendar . parseDate ( inst . get ( 'dateFormat' ) , datesText [ i ] ) ; if ( date ) { var found = false ; for ( var j = 0 ; j < dates . length ; j ++ ) { if ( dates [ j ] . compareTo ( date ) === 0 ) { found = true ; break ; } } if ( ! found ) { dates . push ( date ) ; } } } catch ( e ) { // Ignore } } dates . splice ( inst . options . multiSelect || ( inst . options . rangeSelect ? 2 : 1 ) , dates . length ) ; if ( inst . options . rangeSelect && dates . length === 1 ) { dates [ 1 ] = dates [ 0 ] ; } return dates ; }
Extract possible dates from a string.
@memberof CalendarsPicker
@private
@param inst {object} The current instance settings.
@param text {string} The text to extract from.
@return {CDate[]} The extracted dates.
Extract possible dates from a string .