....................................../////.===Hehe-Here===./////................................................ > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < ------------------------------------------------------------------------------------------------------------------- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// RIFF¤ WEBPVP8 ˜ ðÑ *ôô>‘HŸK¥¤"§£±¨àð enü¹%½_F‘åè¿2ºQú³íªú`N¿­3ÿƒügµJžaÿ¯ÿ°~¼ÎùnúîÞÖô•òíôÁÉß®Sm¥Ü/ ‡ó˜f£Ùà<˜„xëJ¢Ù€SO3x<ªÔ©4¿+ç¶A`q@Ì“Úñè™ÍÿJÌ´ª-˜ÆtÊÛL]Ïq*‘Ý”ì#ŸÌÏãY]@ê`¿ /ªfkØB4·®£ó z—Üw¥Pxù–ÞLШKÇN¾AkÙTf½è'‰g gÆv›Øuh~ a˜Z— ïj*á¥t d£“uÒ ¨`K˜¹ßþ]b>˜]_ÏÔ6W—è2r4x•íÖ…"ƒÖNîä!¦å Ú}ýxGøÌ —@ ;ÆÚŠ=ɾ1ý8lªË¥ô ^yf®Œ¢u&2©nÙÇ›ñÂñŒ³ aPo['½»øFùà­+4ê“$!lövlüÞ=;N®3ð‚õ›DÉKòÞ>ÄÍ ¥ˆuߤ#ˆ$6ù™¥îЇy’ÍB¼ çxÛ;X"WL£R÷͝*ó-¶Zu}º.s¸sšXqù–DþÿvªhüïwyŸ ¯é³lÀ:KCûÄ£Ëá\…­ ~—ýóî ¼ûûÜTÓüÇy…ŽÆvc»¾×U ñ¸žþоP÷¦ó:Ò¨¨5;Ð#&#ÖúñläÿÁœ GxÉ­/ñ‡áQðìYÉtÒw޼GÔ´zàÒò ð*ëzƒ•4~H]Ø‹f ñÓÈñ`NåWçs'ÆÏW^ø¹!XžµmQ5ÃËoLœÎ: ÞËÍ¥J ù…î èo£ßPÎñ¶ž8.Œ]ʵ~5›ÙË-ù*8ÙÖß±~ ©¹rÓê‚j¶d¸{^Q'˜±Crß ÚH—#¥¥QlÀ×ëã‡DÜ«èî þ&Çæžî;ŽÏºò6ÒLÃXy&ZŒ'j‚¢Ù€IßÚù+–MGi‰*jE€‘JcÜ ÓÌ EÏÚj]o˜ Þr <¾U ûŪæÍ/šÝH¥˜b”¼ ÁñßX GP›ï2›4WŠÏà×£…íÓk†¦H·ÅíMh–*nó÷à]ÁjCº€b7<ب‹¨5車bp2:Á[UªM„QŒçiNMa#<5›áËó¸HýÊ"…×Éw¹¦ì2º–x<›»a±¸3Weü®FÝ⑱ö–î–³|LPÈ~çð~Çå‡|º kD¢µÏàÆAI %1À% ¹Ò – ”ϝS¦‰4&¶£°à Öý”û_Ò Áw°A«Å€?mÇÛgHÉ/8)á¾ÛìáöŽP í¨PŸNÙµº¦‡§Ùš"ÿ«>+ªÕ`Ê÷‡‚ß Õû˜þãÇ-PÍ.¾XV‘€ dÜ"þ4¹ ±Oú‘©t¥¦FªÄÃÄ•b‚znýu½—#cDs˜ÃiÑOˆñ×QO=*IAÊ,¶ŽZƒ;‡wøXè%EÐk:F±Ú” .Ѽ+Áu&Ç`."pÈÉw o&¿dE6‘’EqTuK@Ì¥ã™À(Êk(h‰,H}RÀIXÛš3µ1©_OqÚÒJAñ$ÊÙÜ;D3çŒ[þùœh¬Ã³™ö6ç†NY".Ú‰ï[ªŸŒ '²Ð öø_¨ÂÉ9ué¶³ÒŠõTàîMØ#û¯gN‡bÙ놚X„ö …ÉeüÌ^J ‹€.œ$Æ)βÄeæW#óüßĺŸ€ ÀzwV 9oä»f4V*uB «Ë†¹ì¯žR霓æHXa=&“I4K;¯ç‹h×·"UŠ~<•╪Vêª&ÍSÃÆÅ?ÔqÎ*mTM ˜›µwêd#[C¡©§‘D<©àb†–ÁœøvH/,í:¯( ²£|4-„Æövv„Yͼ™^Á$ˆ„¢Û[6yB.åH*V¨æ?$=˜Ñ€•ñ·­(VlŸ‘ nÀt8W÷´Bûba?q9ú¶Xƒl«ÿ\ù¶’þòUÐj/õ¢Ìµ³g$ƒÎR!¸»|Oߍë’BhîÚÑ¢ñåŒJ„®„£2Ð3•ô02Nt…!£Í]Ïc½Qÿ?ˆ<&ÃA¾Ú,JˆijÌ#5yz„‰Î|ÊŽ5QÏ:‹ÐaóVÔxW—CpeÏzÐïíçôÿÅ_[hãsÐ_/ŽTÝ?BîˆííV$<¿i>²F¬_Eß¿ †bÊŒº­ÿ®Z H“C}”¬,Mp ý/Bá£w>˜YV°aƒúh+cŠ- r/[%|üUMHäQ°X»|û/@|°¥Ð !BÔ Ç¢Ä©š+Õì D«7ìN¶ŽðÔ " ƶ’ÖçtA‰Û×}{tþz­¾GÍ›k¹OEJR$ Â׃ «ëÁ"oÉôž$oUK(Ä)Ãz³Ê-‹êN[Ò3Œñbï8P 4ƒ×q¢bo|?<ÛX¬òÄͰL–±›(™ûG?ýË©ÚÄ–ÂDØÐ_Ç¡ô ¾–ÄÏø ×e8Ë©$ÄF¹Å‹ì[©óìl:F¾f´‹‹Xì²ï®\¬ôùƒ ÿat¥óèÒùHß0äe‚;ü×h:ÆWðHž=Ã8骣"kœ'Y?³}Tûè€>?0l›e1Lòñ„aæKÆw…hÖŠùW…ÈÆÄ0ši·›[pcwËþñiêíY/~-Á5˜!¿†A›™Mÿþ(±“t@â“ö2­´TG5yé]çå僳 .·ÍïçÝ7UÚ±Ð/Nè»,_Ï ùdj7\ï Wì4›„»c¸àešg#ÒÊ⥭áØo5‘?ÌdÝô¯ ¹kzsƒ=´#ëÉK›Ø´±-¥eW?‡çßtòTã…$Ý+qÿ±ƒ÷_3Ô¥í÷:æ–ž<·Ö‡‰Å¢ š‡%Ô—utÌÈìðžgÖÀz²À—ï÷Óîäõ{K'´È÷³yaÏÁjƒô}ž§®æÊydÕÈë5¯èˆõvÕ©ã*çD„ “z„Ó‡^^xÂ3M§A´JG‚öï 3W'ˆ.OvXè¡ÊÕª?5º7†˜(˜Ç¶#çê’¶!ÌdZK§æ 0fãaN]òY³RV ™î$®K2R¨`W!1Ôó\;Ý ýB%qæK•&ÓÈe9È0êI±žeŸß -ú@žQr¦ ö4»M¼Áè¹µmw 9 EÆE_°2ó„ŸXKWÁ×Hóì^´²GѝF©óäR†¦‰ç"V»eØ<3ùd3ÿÚ¤Žú“Gi" —‘_ÙËÎ~Üö¯¥½Î»üŸEÚŽåmÞþí ;ÞólËΦMzA"Âf(´òá;Éï(/7½ûñÌ­cïÕçлþÝz¾-ÍvÑ“pH­–ðÓj$¸Äû¤‚‘ãUBË-n“2åPkS5&‹Â|+g^œ®Ì͆d!OïäîU«c;{Û!ÅŽ«ëZ9Ókóˆ]¯ƒ›né `ÇÒ+tÆš (ØKá¾—=3œ®•vuMñg²\ï Ec€ 05±d™‡×iÇ×›UúvÌ¢£Èþ¡ÕØô¶ßÎA"ß±#Ö²ˆÊŸ¦*Ä~ij|àø.-¼'»Ú¥£h ofº¦‡VsR=N½„Î v˜Z*SÌ{=jÑB‹tê…;’HžH¯8–îDù8ñ¢|Q•bÛçš–‹m³“ê¨ åÏ^m¬Žãþ©ïêO‡½6] µÆ„Ooòü ²x}N¦Ë3ïé¿»€›HA˜m%çÞ/¿í7Fø“‹léUk)É°Œµ8Q8›:ÀŠeT*šõ~ôڝG6 ¢}`ùH­–”¡k ‰P1>š†®9z11!X wKfmÁ¦xÑ,N1Q”–æB¶M…ÒÃv6SMˆhU¬ÊPŽï‘öj=·CŒ¯u¹ƒVIЃsx4’ömÛýcå¡¶7ßŠß 57^\wÒÐÆ k§h,Œý î«q^R½3]J¸ÇðN ‚çU¬ôº^Áì} ³f©Õœ§ˆã:FÄÈ‚é(€™?àýÓüè1Gô£¼éj‚OÅñ  #>×—ßtà 0G¥Åa뀐kßhc™À_ÉñÞ#±)GD" YîäË-ÿÙ̪ ¹™a¯´¢E\ÝÒö‚;™„ë]_ p8‰o¡ñ+^÷ 3‘'dT4œŽ ðVë½° :¬víÑ«£tßÚS-3¶“þ2 †üüʨòrš¹M{É_¤`Û¨0ìjœøJ‡:÷ÃáZ˜†@GP&œÑDGÏs¡þ¦þDGú‘1Yá9Ôþ¼ ûø…§÷8&–ÜÑnÄ_m®^üÆ`;ÉVÁJ£?â€-ßê}suÍ2sõA NÌúA磸‘îÿÚ»ƒìö·á¿±tÑÐ"Tÿü˜[@/äj¬€uüªìù¥Ý˜á8Ý´sõj 8@rˆð äþZÇD®ÿUÏ2ùôõrBzÆÏÞž>Ì™xœ“ wiÎ×7_… ¸ \#€MɁV¶¥üÕÿPÔ9Z‡ø§É8#H:ƒ5ÀÝå9ÍIŒ5åKÙŠ÷qÄ>1AÈøžj"µÂд/ªnÀ qªã}"iŸBå˜ÓÛŽ¦…&ݧ;G@—³b¯“•"´4í¨ôM¨åñC‹ïùÉó¯ÓsSH2Ý@ßáM‡ˆKÀªÛUeø/4\gnm¥‹ŸŒ qÄ b9ÞwÒNÏ_4Ég³ú=܆‚´ •â¥õeíþkjz>éÚyU«Íӝ݃6"8/ø{=Ô¢»G¥ äUw°W«,ô—¿ãㆅү¢³xŠUû™yŒ (øSópÐ 9\åTâ»—*oG$/×ÍT†Y¿1¤Þ¢_‡ ¼ „±ÍçèSaÓ 3ÛMÁBkxs‰’R/¡¤ˆÙçª(*õ„üXÌ´ƒ E§´¬EF"Ù”R/ÐNyÆÂ^°?™6¡œïJ·±$§?º>ÖüœcNÌù¯G ‹ñ2ЁBB„^·úìaz¨k:#¨Æ¨8LÎõލ£^§S&cŒÐU€ü(‡F±Š¼&P>8ÙÁ ‰ p5?0ÊÆƒZl¸aô š¼¡}gÿ¶zÆC²¹¬ÎÖG*HB¡O<º2#ñŒAƒ–¡B˜´É$¥›É:FÀÔx¾u?XÜÏÓvN©RS{2ʈãk9rmP¼Qq̳ è¼ÐFׄ^¡Öì fE“F4A…!ì/…¦Lƒ… … $%´¾yã@CI¬ á—3PþBÏNÿ<ý°4Ü ËÃ#ØÍ~âW«rEñw‹eùMMHß²`¬Öó½íf³:‹k˜¯÷}Z!ã¿<¥,\#öµÀ¯aÒNÆIé,Ћ–lŽ#Àæ9ÀÒS·I’½-Ïp Äz¤Š Â* ­íÄ9­< h>׍3ZkËU¹§˜ŒŠ±f­’¤º³Q ÏB?‹#µíÃ¥®@(Gs«†vI¥Mµ‹Á©e~2ú³ÁP4ìÕi‚²Ê^ö@-DþÓàlÜOÍ]n"µã:žpsŽ¢:! Aõ.ç~ÓBûH÷JCÌ]õVƒd «ú´QÙEA–¯¯Œ!.ˆˆëQ±ù œ·Ì!Õâ )ùL„ÅÀlÚè5@B…o´Æ¸XÓ&Û…O«˜”_#‡ƒ„ûÈt!¤ÁÏ›ÎÝŠ?c9 â\>lÓÁVÄÑ™£eØY]:fÝ–—ù+p{™ðè û³”g±OƒÚSù£áÁÊ„ä,ï7š²G ÕÌBk)~ÑiCµ|h#u¤¶îK¨² #²vݯGãeÖ϶ú…¾múÀ¶þÔñ‚Š9'^($¤§ò “š½{éúp÷J›ušS¹áªCÂubÃH9™D™/ZöØÁ‡¦ÝÙŸ·kð*_”.C‹{áXó€‡c¡c€§/šò/&éš÷,àéJþ‰X›fµ“C¨œ®r¬"kL‰Â_q…Z–.ÉL~O µ›zn‚¹À¦Öª7\àHµšÖ %»ÇníV[¥*Õ;ƒ#½¾HK-ÖIÊdÏEÚ#=o÷Óò³´Š: Ç?{¾+9›–‘OEáU·S€˜j"ÄaÜ ŒÛWt› á–c#a»pÔZÞdŽtWê=9éöÊ¢µ~ ë ;Öe‡Œ®:bî3±ýê¢wà¼îpêñ¹¾4 zc¾ðÖÿzdêŒÑÒŝÀ‰s6¤í³ÎÙB¿OZ”+F¤á‡3@Ñëäg©·Ž ˆèª<ù@É{&S„œÕúÀA)‰h:YÀ5^ÂÓŒ°õäU\ ùËÍû#²?Xe¬tu‰^zÒÔãë¼ÛWtEtû …‚g¶Úüâî*moGè¨7%u!]PhÏd™Ý%Îx: VÒ¦ôÊD3ÀŽKÛËãvÆî…N¯ä>Eró–ð`5 Œ%u5XkñÌ*NU%¶áœÊ:Qÿú»“úzyÏ6å-၇¾ ´ ÒÊ]y žO‘w2Äøæ…H’²f±ÎÇ.ª|¥'gîV•Ü .̘¯€šòü¤U~Ù†*¢!?ò wý,}´°ÔÞnïoKq5µb!áÓ3"vAßH¡³¡·G(ÐÎ0Îò¼MG!/ài®@—¬04*`…«é8ªøøló“ˆÊ”èù¤…ßÊoÿé'ËuÌÖ5×È¡§ˆˆfŽë9}hìâ_!!¯  B&Ëö¶‰ÀAÙNVŸ Wh›¸®XÑJì¨ú“¿÷3uj²˜¨ÍÎìë±aúŠÝå¯ð*Ó¨ôJ“yºØ)m°WýOè68†ŸÏ2—‰Ïüꪫٚ¥‹l1 ø ÏÄFjêµvÌbü¦èÝx:X±¢H=MÐß—,ˆÉÇ´(9ú¾^ÅÚ4¿m‡$âX‘å%(AlZo@½¨UOÌÕ”1ø¸jÎÀÃÃ_ µ‘Ü.œº¦Ut: Æï’!=¯uwû#,“pþÇúŒø(é@?³ü¥‘Mo §—s@Œ#)§ŒùkL}NOÆêA›¸~r½¼ÙA—HJ«eˆÖ´*¡ÓpÌŸö.m<-"³ûÈ$¬_6­åf£ïÚâj1y§ÕJ½@dÞÁr&Í\Z%D£Íñ·AZ Û³øüd/ªAi†/Й~  ‡âĮҮÏh§°b—›Û«mJžòG'[ÈYýŒ¦9psl ýÁ ®±f¦x,‰½tN ‚Xª9 ÙÖH.«Lo0×?͹m¡å†Ѽ+›2ƒF ±Ê8 7Hցϓ²Æ–m9…òŸï]Â1äN†VLâCˆU .ÿ‰Ts +ÅÎx(%¦u]6AF Š ØF鈄‘ |¢¶c±soŒ/t[a¾–û:s·`i햍ê›ËchÈ…8ßÀUÜewŒðNOƒõD%q#éû\9¤x¹&UE×G¥ Í—™$ð E6-‡¼!ýpãÔM˜ Âsìe¯ñµK¢Ç¡ùôléœ4Ö£”À Š®Ðc ^¨À}ÙËŸ§›ºê{ÊuÉC ×Sr€¤’fÉ*j!úÓ’Gsùìoîßîn%ò· àc Wp÷$¨˜)û»H ×8ŽÒ€Zj¤3ÀÙºY'Ql¦py{-6íÔCeiØp‘‡XÊîÆUߢ܂ž£Xé¼Y8þ©ëgñß}é.ÎógÒ„ÃØËø¯»™§Xýy M%@NŠ À(~áÐvu7&•,Ù˜ó€uP‡^^®=_E„jt’ 403WebShell
403Webshell
Server IP : 172.67.169.23  /  Your IP : 216.73.217.46
Web Server : nginx/1.28.3
System : Linux 4e27b89abc44 6.8.0-147-generic #147-Ubuntu SMP PREEMPT_DYNAMIC Thu Sep 24 11:33:16 UTC 2026 x86_64
User :  ( 1000)
PHP Version : 8.2.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /sites/xo-fab.com/www/media/com_rsform/js/jquerycalendar/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /sites/xo-fab.com/www/media/com_rsform/js/jquerycalendar/script.js
if (typeof RSFormPro !== 'object') {
	var RSFormPro = {};
}

// if the browser has not defined the Object.keys function
if (!Object.keys) Object.keys = function(o) {
	if (o !== Object(o))
		throw new TypeError('Object.keys called on a non-object');
	var k=[],p;
	for (p in o) if (Object.prototype.hasOwnProperty.call(o,p)) k.push(p);
	return k;
};

// set the moment custom localization
jQuery(document).ready(function(){
	moment.locale('custom', {
		months : RSFormPro.jQueryCalendar.settings.MONTHS_LONG,
		monthsShort : RSFormPro.jQueryCalendar.settings.MONTHS_SHORT,
		weekdays : RSFormPro.jQueryCalendar.settings.WEEKDAYS_LONG,
		weekdaysShort : RSFormPro.jQueryCalendar.settings.WEEKDAYS_MEDIUM,
		weekdaysMin: RSFormPro.jQueryCalendar.settings.WEEKDAYS_SHORT
	});
});

Date.parseDate = function( input, format ){
	return moment(input,format).toDate();
};
Date.prototype.dateFormat = function( format ){
	return moment(this).format(format);
};

RSFormPro.jQueryCalendar = {
	settings: {},
	calendars:  {},
	calendarsData: {},
	setCalendar: function(formId, idCalendar, config) {
		if (typeof RSFormPro.jQueryCalendar.calendarsData[formId] === 'undefined') {
			RSFormPro.jQueryCalendar.calendarsData[formId] = {};
		}
		if (typeof RSFormPro.jQueryCalendar.calendarsData[formId][idCalendar] === 'undefined') {
			RSFormPro.jQueryCalendar.calendarsData[formId][idCalendar] = {};
		}
		RSFormPro.jQueryCalendar.calendarsData[formId][idCalendar].config = config;
	},
	renderCalendars: function() {
		var forms = Object.keys(RSFormPro.jQueryCalendar.calendarsData);
		var countForms = forms.length;

		if (countForms > 0) {
			for (var i = 0; i < countForms; i++) {
				var formId = forms[i];
				var calendarsIds = Object.keys(RSFormPro.jQueryCalendar.calendarsData[formId]);

				for (var j = 0; j < calendarsIds.length; j++) {
					RSFormPro.jQueryCalendar.initCalendar(formId, calendarsIds[j], RSFormPro.jQueryCalendar.calendarsData[formId][calendarsIds[j]].config);
				}
			}
		}
	},
	initCalendar: function(formId, idCalendar, config) {
		if (typeof RSFormPro.jQueryCalendar.calendars[formId] === 'undefined') {
			RSFormPro.jQueryCalendar.calendars[formId] = {};
		}


		var calendarId 	 = 'cal'+idCalendar;
		var txtDate 	 = jQuery('#txtjQ' + calendarId);

		if (!txtDate.length)
		{
			return;
		}

		var hiddenDate 	 = jQuery('#hiddenjQ' + calendarId);
		var calendarName = txtDate.attr('name').substring(5, txtDate.attr('name').length - 1);

		if (typeof RSFormPro.jQueryCalendar.calendars[formId][calendarName] === 'undefined') {
			// initiate the object
			RSFormPro.jQueryCalendar.calendars[formId][calendarName] = {};
			// check if the date format configured by the user has any time data in it
			var hasTimeDateFormat = /H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|S{1,3}|Z{1,2}/.test(config.format);
			if (config.timepicker && !hasTimeDateFormat) {
				config.timepicker = false;
			}
			// if the value is set configure the startDate and apply it to the hidden field
			var startDate = RSFormPro.jQueryCalendar.stringToDate(config.value, config.timepicker);
			if (startDate) {
				hiddenDate.val(config.value);
			}

			// set the min and max Date
			var minDate = typeof config.extra.minDate !== 'undefined' ? config.extra.minDate : false;
			var maxDate = typeof config.extra.maxDate !== 'undefined' ? config.extra.maxDate : false;

			// set the min and max Time
			var minTime = (typeof config.extra.minTime !== 'undefined' && config.extra.minTime.indexOf(':') > -1) ? config.extra.minTime : false;
			var maxTime = (typeof config.extra.maxTime !== 'undefined' && config.extra.maxTime.indexOf(':') > -1) ? config.extra.maxTime : false;
			// set the time step
			var step = (typeof config.extra.step !== 'undefined' && !isNaN(config.extra.step)) ? parseInt(config.extra.step) : 60;

			// set the allowDates
			var allowDates = (typeof config.extra.allowDates === 'object' && jQuery.isArray(config.extra.allowDates)) ? config.extra.allowDates : [];
			// set the allowDateRe
			var allowDateRe = typeof config.extra.allowDateRe !== 'undefined' ? config.extra.allowDateRe : null;

			// set the disabledDates
			var disabledDates = (typeof config.extra.disabledDates === 'object' && jQuery.isArray(config.extra.disabledDates)) ? config.extra.disabledDates : [];
			// set the allowDateRe
			var disabledWeekDays = (typeof config.extra.disabledWeekDays === 'object' && jQuery.isArray(config.extra.disabledWeekDays)) ? config.extra.disabledWeekDays : [];

			// set the hidden field date format
			var hiddenFormat = 'MM/DD/YYYY';
			if (config.timepicker) {
				hiddenFormat += ' HH:mm';
			}

			// set the rule
			var operation 	= false;
			var offset 		= 1;
			if (config.extra.rule) {
				var rule 				= config.extra.rule.split('|');
				var otherCalendarName   = rule[1];
				operation 				= rule[0];

				if (typeof rule[2] !== 'undefined')
				{
					offset = parseInt(rule[2]);
				}
			}

			// set the timepicker format
			if (typeof config.timepickerformat === 'undefined') {
				config.timepickerformat = 'HH:mm';
			}

			// set the minTime/maxTime for the specific date according to the minDate/MaxDate
			var minSpecificTime = '';
			var maxSpecificTime = '';
			if (config.timepicker) {
				if (minDate) {
					var minDateParts = minDate.split(' ');
					minDate = minDateParts[0];
					minSpecificTime = minDateParts[1];
				}
				if (maxDate) {
					var maxDateParts = maxDate.split(' ');
					maxDate = maxDateParts[0];
					maxSpecificTime = maxDateParts[1];
				}
			}

			// set the minDate and maxDate for the other calendar if the rule is present
			if (operation && ((typeof config.value !== 'undefined' && config.value != '') || minDate || maxDate)) {
				// configure the date and time regarding the rule for the other calendar
				var referenceDate = false;
				if (typeof config.value != 'undefined' && config.value != '') {
					referenceDate = config.value;
				} else if (minDate && operation == 'min') {
					referenceDate = minDate;
				} else if (maxDate && operation == 'max') {
					referenceDate = maxDate;
				}

				if (referenceDate) {
					var newDateParts = referenceDate.split(' ');
					var newDate = newDateParts[0];
					var newTime = false;
					if (newDateParts.length > 1) {
						newTime = newDateParts[1];
					}

					// if the calendar does not use the timepicker we must increment or decrement the day by 1
					if (!config.timepicker) {
						var newDateObject = new Date.parseDate(newDate, 'MM/DD/YYYY');
						if (operation == 'min') {
							var d = newDateObject.getDate() + offset;
						} else {
							var d = newDateObject.getDate() - offset;
						}
						newDateObject.setDate(d);
						newDate = newDateObject.dateFormat('MM/DD/YYYY');
					}

					var otherCalendar = false;
					if (typeof RSFormPro.jQueryCalendar.calendars[formId][otherCalendarName] != 'undefined') {
						otherCalendar = RSFormPro.jQueryCalendar.calendars[formId][otherCalendarName];
					}

					if (otherCalendar) {
						RSFormPro.jQueryCalendar.calendars[formId][otherCalendarName].calendar.datetimepicker((operation == 'min' ? {minDate: newDate} : {maxDate: newDate}));

						var newDateObject = new Date.parseDate(newDate, 'MM/DD/YYYY');
						var otherDate = RSFormPro.jQueryCalendar.calendars[formId][otherCalendarName].currentDate;
						if (otherDate != '') {
							otherDate = Date.parseDate(otherDate, RSFormPro.jQueryCalendar.calendars[formId][otherCalendarName].hiddenFormat);
							if ((operation == 'min' && newDateObject.getTime() > otherDate.getTime()) || (operation == 'max' && newDateObject.getTime() < otherDate.getTime())) {
								RSFormPro.jQueryCalendar.calendars[formId][otherCalendarName].calendar.val('');
								RSFormPro.jQueryCalendar.calendars[formId][otherCalendarName].calendar.datetimepicker({startDate:false});
								RSFormPro.jQueryCalendar.calendars[formId][otherCalendarName].hiddenDate.val('');
							}
						}

						if (newTime) {
							RSFormPro.jQueryCalendar.calendars[formId][otherCalendarName].calendar.datetimepicker((operation == 'min' ? {minTime: newTime} : {maxTime: newTime}));
						}
					} else {
						var otherCalendarInput = document.getElementsByName("form["+otherCalendarName+"]");

						// get the proper field
						for (i = 0 ; i < otherCalendarInput.length; i++) {
							var otherCalendarId = otherCalendarInput[i].id;
							if (otherCalendarId.indexOf('txtjQcal'+formId+'_') === 0)
							{
								otherCalendarId = otherCalendarId.substring(8, otherCalendarId.length);
								break;
							}
						}

						if (operation == 'min') {
							if (typeof RSFormPro.jQueryCalendar.calendarsData[formId][otherCalendarId].config.extra.minDate == 'undefined') {
								RSFormPro.jQueryCalendar.calendarsData[formId][otherCalendarId].config.extra.minDate = '';
							}
							RSFormPro.jQueryCalendar.calendarsData[formId][otherCalendarId].config.extra.minDate = newDate;
						}
						if (operation == 'max') {
							if (typeof RSFormPro.jQueryCalendar.calendarsData[formId][otherCalendarId].config.extra.maxDate == 'undefined') {
								RSFormPro.jQueryCalendar.calendarsData[formId][otherCalendarId].config.extra.maxDate = '';
							}
							RSFormPro.jQueryCalendar.calendarsData[formId][otherCalendarId].config.extra.maxDate = newDate;
						}

						var otherTxtDate = jQuery('#txtjQcal'+otherCalendarId);
						var otherHiddenDate = jQuery('#hiddenjQcal'+otherCalendarId);

						var otherDate = new Date.parseDate(otherHiddenDate.val(), 'MM/DD/YYYY HH:mm');
						var newDateObject = new Date.parseDate(newDate, 'MM/DD/YYYY');

						if ((operation == 'min' && newDateObject.getTime() > otherDate.getTime()) || (operation == 'max' && newDateObject.getTime() < otherDate.getTime())) {
							otherHiddenDate.val('');
							otherTxtDate.val('');
							RSFormPro.jQueryCalendar.calendarsData[formId][otherCalendarId].config.value='';
						}

						if (newTime) {
							RSFormPro.jQueryCalendar.calendarsData[formId][otherCalendarId].config.extra.useTimeLogic = {date: newDate, time: newTime, rule: operation};
						}
					}
				}
			}

			// set the current date based on the config value if is set and the hidden date format, will be needing this for the correct rule implementation
			RSFormPro.jQueryCalendar.calendars[formId][calendarName].currentDate  = config.value;
			RSFormPro.jQueryCalendar.calendars[formId][calendarName].hiddenFormat = hiddenFormat;
			RSFormPro.jQueryCalendar.calendars[formId][calendarName].hiddenDate   = hiddenDate;
			RSFormPro.jQueryCalendar.calendars[formId][calendarName].timepicker   = config.timepicker;
			RSFormPro.jQueryCalendar.calendars[formId][calendarName].useTimeLogic = (typeof config.extra.useTimeLogic != 'undefined' ? config.extra.useTimeLogic : false);
			RSFormPro.jQueryCalendar.calendars[formId][calendarName].callbackSelectedDateTime = false;

			if (minSpecificTime != '' || maxSpecificTime !='') {
				RSFormPro.jQueryCalendar.calendars[formId][calendarName].useSpecificTimeLogic = {minSpecificTime:minSpecificTime, maxSpecificTime: maxSpecificTime, minDate: minDate, maxDate: maxDate, defaultMinTime:minTime, defaultMaxTime: maxTime};
			} else {
				RSFormPro.jQueryCalendar.calendars[formId][calendarName].useSpecificTimeLogic = false;
			}

			var defaultSelectValue = config.inline ? false : true;

			// set yearStart if minDate is available
			var yearStart = 1920;
			var startDateForce = false;
			if (minDate) {
				var minDateObject = new Date.parseDate(minDate, 'MM/DD/YYYY');
				yearStart = minDateObject.getFullYear();

				if (!startDate) {
					var currentTime = new Date();

					if (minDateObject > currentTime) {
						startDateForce = minDateObject;
					}
				}
			}

			// set yearEnd if maxDate is available
			var yearEnd = 2050;
			if (maxDate) {
				var maxDateObject = new Date.parseDate(maxDate, 'MM/DD/YYYY');
				yearEnd = maxDateObject.getFullYear();

				if (!startDate) {
					var currentTime = new Date();

					if (maxDateObject < currentTime) {
						startDateForce = maxDateObject;
					}
				}
			}

			RSFormPro.jQueryCalendar.calendars[formId][calendarName].calendar = jQuery(txtDate).datetimepicker({
				format: config.format, // the format used for the output
				formatDate: 'MM/DD/YYYY', // the format used by the minDate and maxDate
				formatTime: config.timepickerformat, // the time format used in the calendar, works only if the timepicker is available
				inline: config.inline,
				defaultSelect: defaultSelectValue,
				startDate: (startDate ? startDate : startDateForce),
				timepicker: config.timepicker,
				theme: config.theme,
				closeOnDateSelect: config.timepicker == '1' ? false : true,
				closeOnWithoutClick: true,
				minDate: minDate,
				maxDate: maxDate,
				minTime: minTime,
				maxTime: maxTime,
				allowDates: allowDates,
				allowDateRe: allowDateRe,
				disabledDates: disabledDates,
				disabledWeekDays: disabledWeekDays,
				yearStart: yearStart,
				yearEnd: yearEnd,
				step: step,
				validateOnBlur: false,
				onChangeMonth: function($ct, $i){
					// if the timepicker exists but a year is not in the min/max range then we must disable the timepicker if its active
					if (config.timepicker) {
						// check if max/min date is set
						var currentMaxDate = this.getOptions('maxDate');
						var currentMinDate = this.getOptions('minDate');

						// handle the conditions
						if (currentMaxDate || currentMinDate) {
							currentMaxDate = new Date.parseDate(currentMaxDate, 'MM/DD/YYYY HH:mm');
							currentMinDate = new Date.parseDate(currentMinDate, 'MM/DD/YYYY HH:mm');

							if ($ct > currentMaxDate || $ct < currentMinDate){
								this.setOptions({timepicker: false});
							}
						}

						//if the allowDateRe or allowDates are used
						var allowDateRegex = this.getOptions('allowDateRe');
						var allowDates = this.getOptions('allowDates');
						if (allowDateRegex || (allowDates && allowDates.length > 0)) {
							var formatDate = this.getOptions('formatDate');

							if (allowDateRegex) {
								if (!allowDateRegex.test($ct.dateFormat(formatDate))) {
									this.setOptions({timepicker: false});
								}
							} else {
								if(allowDates.indexOf($ct.dateFormat(formatDate)) === -1){
									this.setOptions({timepicker: false});
								}
							}
						}
					}
				},
				dayOfWeekStart: RSFormPro.jQueryCalendar.settings.START_WEEKDAY,
				i18n: {
					'custom': {
						months: RSFormPro.jQueryCalendar.settings.MONTHS_LONG,
						dayOfWeek: RSFormPro.jQueryCalendar.settings.WEEKDAYS_SHORT
					}
				},
				lang: 'custom',
				onSelectDate: function(ct, $i) {
					if (RSFormPro.jQueryCalendar.calendars[formId][calendarName].useSpecificTimeLogic) {
						RSFormPro.jQueryCalendar.specificTimeLogic(this, ct, RSFormPro.jQueryCalendar.calendars[formId][calendarName].useSpecificTimeLogic);
					}

					if (RSFormPro.jQueryCalendar.calendars[formId][calendarName].useTimeLogic) {
						var inputParams = {formId: formId, calendarName: calendarName, config: config};
						RSFormPro.jQueryCalendar.timeLogic(this, ct, inputParams, RSFormPro.jQueryCalendar.calendars[formId][calendarName].useTimeLogic);
					}

					var selectedDate = ct.dateFormat(hiddenFormat);
					if (config.timepicker) {
						// check timepicker state
						var checkTimePicker = this.getOptions('timepicker');
						if (!checkTimePicker) {
							this.setOptions({timepicker: true});
						}
						var currentMinTime = this.getOptions('minTime');
						var currentMaxTime = this.getOptions('maxTime');

						// need the time Line
						var timeLine = RSFormPro.jQueryCalendar.generateTimeLine(ct, currentMinTime, currentMaxTime, step);

						var checkDate = RSFormPro.jQueryCalendar.checkSelected(this, selectedDate, currentMinTime, currentMaxTime, step, timeLine);
						if (checkDate != selectedDate) {
							selectedDate = checkDate;
							var calendarInput = $i;
							if (selectedDate != '') {
								var startDateObject = RSFormPro.jQueryCalendar.stringToDate(selectedDate, true);
								var startMiliseconds = startDateObject.getTime();
								ct.setTime(startMiliseconds);
								calendarInput.val(startDateObject.dateFormat(config.format));
							} else {
								calendarInput.val(selectedDate);
							}
						}

						// if the currentMinTime is higher than the currentMaxTime we need to increment a day in the calendar
						if (currentMinTime && currentMaxTime) {
							var curentMinTimeParts = currentMinTime.split(':');
							var currentMaxTimeParts = currentMaxTime.split(':');

							var change = false;
							if (parseInt(curentMinTimeParts[0]) > parseInt(currentMaxTimeParts[0])) {
								change = true;
							} else {
								if (parseInt(curentMinTimeParts[1]) > parseInt(currentMaxTimeParts[1])) {
									change = false;
								}
							}

							if (change) {
								var d = ct.getDate() + 1;
								var minTimeParts = minTime.split(':');
								ct.setHours(minTimeParts[0]);
								ct.setMinutes(minTimeParts[1]);
								ct.setSeconds(0);
								ct.setDate(d);
								this.setOptions({minDate:ct.dateFormat('MM/DD/YYYY'), minTime:minTime, maxTime:maxTime});

								calendarInput.val(ct.dateFormat(config.format));
								selectedDate = ct.dateFormat(hiddenFormat);
							}
						}
					}

					hiddenDate.val(selectedDate);
					RSFormPro.jQueryCalendar.calendars[formId][calendarName].currentDate = selectedDate;
				},
				onSelectTime: function(ct, $i) {
					var selectedDate = ct.dateFormat(hiddenFormat);

					if (operation && config.timepicker) {
						// if the calendar only has the time picker we must let the timepicker option unchanged
						if (RSFormPro.jQueryCalendar.calendars[formId][otherCalendarName].datepicker && RSFormPro.jQueryCalendar.calendars[formId][otherCalendarName].timepicker) {
							RSFormPro.jQueryCalendar.calendars[formId][otherCalendarName].calendar.datetimepicker({timepicker: false});
						}
					}

					hiddenDate.val(selectedDate);
					RSFormPro.jQueryCalendar.calendars[formId][calendarName].currentDate = selectedDate;
				},

				// used to take in consideration the rules
				onChangeDateTime: function(dp,$input) {
					if (RSFormPro.jQueryCalendar.calendars[formId][calendarName].useSpecificTimeLogic) {
						RSFormPro.jQueryCalendar.specificTimeLogic(this, dp, RSFormPro.jQueryCalendar.calendars[formId][calendarName].useSpecificTimeLogic);
					}

					if (RSFormPro.jQueryCalendar.calendars[formId][calendarName].useTimeLogic) {
						var inputParams = {formId: formId, calendarName: calendarName, config: config};
						RSFormPro.jQueryCalendar.timeLogic(this, dp, inputParams, RSFormPro.jQueryCalendar.calendars[formId][calendarName].useTimeLogic);
					}

					if (operation) {
						var selectedDateTime = dp;
						var otherCalendarDate = false;

						if (!RSFormPro.jQueryCalendar.calendars[formId][calendarName].timepicker) {
							otherCalendarDate = Date.parse(selectedDateTime);
							otherCalendarDate = new Date(otherCalendarDate);
							if (operation == 'min') {
								var d = otherCalendarDate.getDate() + offset;
							} else {
								var d = otherCalendarDate.getDate() - offset;
							}

							otherCalendarDate.setDate(d);
						}

						if (!otherCalendarDate) {
							otherCalendarDate = selectedDateTime;
						}

						// force startDate
						var currentTime = new Date();
						var startDateForceOther = false;
						var startForceCalendar = false;
						if ((operation == 'min' && otherCalendarDate > currentTime) || (operation == 'max' && otherCalendarDate < currentTime)) {
							startDateForceOther = otherCalendarDate;
						}

						var otherDate = RSFormPro.jQueryCalendar.calendars[formId][otherCalendarName].currentDate;
						if (otherDate != '') {
							otherDate = Date.parseDate(otherDate, RSFormPro.jQueryCalendar.calendars[formId][otherCalendarName].hiddenFormat);
							if ((operation == 'min' && selectedDateTime.getTime() > otherDate.getTime()) || (operation == 'max' && selectedDateTime.getTime() < otherDate.getTime())) {
								RSFormPro.jQueryCalendar.calendars[formId][otherCalendarName].calendar.val('');
								RSFormPro.jQueryCalendar.calendars[formId][otherCalendarName].calendar.datetimepicker({startDate:startDateForceOther});
								RSFormPro.jQueryCalendar.calendars[formId][otherCalendarName].hiddenDate.val('');
								if (RSFormPro.jQueryCalendar.calendars[formId][otherCalendarName].timepicker) {
									RSFormPro.jQueryCalendar.calendars[formId][otherCalendarName].calendar.datetimepicker({timepicker: false});
								}
								startForceCalendar = false;
							}
						} else {
							// if there is no date previously selected we only need to set the start date if the startDateForceOther is set
							if (startDateForceOther) {
								RSFormPro.jQueryCalendar.calendars[formId][otherCalendarName].calendar.datetimepicker({startDate:startDateForceOther});
								startForceCalendar = false;
							}
						}

						var selectedDate = otherCalendarDate.dateFormat('MM/DD/YYYY');
						var selectedTime = otherCalendarDate.dateFormat('HH:mm');

						RSFormPro.jQueryCalendar.calendars[formId][otherCalendarName].calendar.datetimepicker((operation == 'min' ? {minDate: selectedDate, yearStart: otherCalendarDate.getFullYear()} : {maxDate: selectedDate, yearEnd: otherCalendarDate.getFullYear()}));

						if (startForceCalendar  && startDateForceOther) {
							if (RSFormPro.jQueryCalendar.calendars[formId][otherCalendarName].calendarInstance.getOptions('inline')) {
								RSFormPro.jQueryCalendar.calendars[formId][otherCalendarName].calendarInstance.setOptions({value:startDateForceOther});
								RSFormPro.jQueryCalendar.calendars[formId][otherCalendarName].calendarInstance.setOptions({value:''});
							}
						}

						if (RSFormPro.jQueryCalendar.calendars[formId][calendarName].timepicker) {

							RSFormPro.jQueryCalendar.calendars[formId][otherCalendarName].useTimeLogic = {date: selectedDate, time: selectedTime, rule: operation};
						}
					}
				},

				onAfterChanges : function(ct, $i) {
					if (RSFormPro.jQueryCalendar.calendars[formId][calendarName].useTimeLogic) {
						var inputParams = {formId: formId, calendarName: calendarName, config: config};
						RSFormPro.jQueryCalendar.timeLogic(this, ct, inputParams, RSFormPro.jQueryCalendar.calendars[formId][calendarName].useTimeLogic);
					}

					var selectedDate = ct.dateFormat(hiddenFormat);
					if (config.timepicker) {
						// check timepicker state
						if (!this.getOptions('timepicker')) {
							this.setOptions({timepicker: true});
						}
						var currentMinTime = this.getOptions('minTime');
						var currentMaxTime = this.getOptions('maxTime');

						// need the time Line
						var timeLine = RSFormPro.jQueryCalendar.generateTimeLine(ct, currentMinTime, currentMaxTime, step);

						var checkDate = RSFormPro.jQueryCalendar.checkSelected(this, selectedDate, currentMinTime, currentMaxTime, step, timeLine);
						if (checkDate != selectedDate) {
							selectedDate = checkDate;
							var calendarInput = $i;
							if (selectedDate != '') {
								var startDateObject = RSFormPro.jQueryCalendar.stringToDate(selectedDate, true);
								var startMiliseconds = startDateObject.getTime();
								ct.setTime(startMiliseconds);
								calendarInput.val(startDateObject.dateFormat(config.format));
							} else {
								calendarInput.val(selectedDate);
							}
						}

						// if the currentMinTime is higher than the currentMaxTime we need to increment a day in the calendar
						if (currentMinTime && currentMaxTime) {
							var curentMinTimeParts = currentMinTime.split(':');
							var currentMaxTimeParts = currentMaxTime.split(':');

							var change = false;
							if (parseInt(curentMinTimeParts[0]) > parseInt(currentMaxTimeParts[0])) {
								change = true;
							} else {
								if (parseInt(curentMinTimeParts[1]) > parseInt(currentMaxTimeParts[1])) {
									change = false;
								}
							}

							if (change) {
								var d = ct.getDate() + 1;
								var minTimeParts = minTime.split(':');
								ct.setHours(minTimeParts[0]);
								ct.setMinutes(minTimeParts[1]);
								ct.setSeconds(0);
								ct.setDate(d);
								this.setOptions({minDate:ct.dateFormat('MM/DD/YYYY'), minTime:minTime, maxTime:maxTime});

								calendarInput.val(ct.dateFormat(config.format));
								selectedDate = ct.dateFormat(hiddenFormat);
							}
						}

					}

					if (operation && selectedDate != '') {
						var selectedDateTime = RSFormPro.jQueryCalendar.stringToDate(selectedDate, config.timepicker);

						// force startDate
						var currentTime = new Date();
						var startDateForceOther = false;
						var startForceCalendar = false;
						if ((operation == 'min' && selectedDateTime > currentTime) || (operation == 'max' && selectedDateTime < currentTime)) {
							startDateForceOther = selectedDateTime;
						}

						var otherDate = RSFormPro.jQueryCalendar.calendars[formId][otherCalendarName].currentDate;

						if (otherDate != '') {
							otherDate = Date.parseDate(otherDate, RSFormPro.jQueryCalendar.calendars[formId][otherCalendarName].hiddenFormat);
							if (
								(operation == 'min' && selectedDateTime.getTime() > otherDate.getTime()) || 
								(operation == 'max' && selectedDateTime.getTime() < otherDate.getTime())) {
								RSFormPro.jQueryCalendar.calendars[formId][otherCalendarName].calendar.val('');
								RSFormPro.jQueryCalendar.calendars[formId][otherCalendarName].calendar.datetimepicker({startDate:startDateForceOther});
								RSFormPro.jQueryCalendar.calendars[formId][otherCalendarName].hiddenDate.val('');
								if (RSFormPro.jQueryCalendar.calendars[formId][otherCalendarName].timepicker) {
									RSFormPro.jQueryCalendar.calendars[formId][otherCalendarName].calendar.datetimepicker({timepicker: false});
								}
								startForceCalendar = true;
							}
						} else {
							// if there is no date previously selected we only need to set the start date if the startDateForceOther is set
							if (startDateForceOther) {
								RSFormPro.jQueryCalendar.calendars[formId][otherCalendarName].calendar.datetimepicker({startDate:startDateForceOther});
								startForceCalendar = true;
							}
						}

						if (operation === 'min') {
							selectedDateTime.setDate(selectedDateTime.getDate() + offset);
						} else {
							selectedDateTime.setDate(selectedDateTime.getDate() - offset);
						}

						var selectedOtherDate = selectedDateTime.dateFormat('MM/DD/YYYY');
						var selectedOtherTime = selectedDateTime.dateFormat('HH:mm');


						// put the minTime/maxTime if the timepicker is active on the same day
						if (otherDate != '' && operation && RSFormPro.jQueryCalendar.calendars[formId][otherCalendarName].calendarInstance.getOptions('timepicker') && selectedOtherDate == otherDate.dateFormat('MM/DD/YYYY'))
						{
							// set the min
							if (operation == 'min')
							{
								RSFormPro.jQueryCalendar.calendars[formId][otherCalendarName].calendarInstance.setOptions({minTime:selectedOtherTime});
							}
							// set the max
							else
							{
								RSFormPro.jQueryCalendar.calendars[formId][otherCalendarName].calendarInstance.setOptions({maxTime:selectedOtherTime});
							}

							// set the selection to the calendar and the hidden field
							if ((operation == 'min' && otherDate.getTime() < selectedDateTime.getTime()) || (operation == 'max' && otherDate.getTime() > selectedDateTime.getTime()))
							{
								RSFormPro.jQueryCalendar.calendars[formId][otherCalendarName].calendarInstance.setOptions({value:selectedDateTime});
								RSFormPro.jQueryCalendar.calendars[formId][otherCalendarName].hiddenDate.val(selectedDateTime.dateFormat(config.format));
							}
						}

						RSFormPro.jQueryCalendar.calendars[formId][otherCalendarName].calendar.datetimepicker((operation == 'min' ? {minDate: selectedOtherDate,yearStart: selectedDateTime.getFullYear()} : {maxDate: selectedOtherDate, yearEnd: selectedDateTime.getFullYear()}));
						if (startForceCalendar  && startDateForceOther) {
							if (RSFormPro.jQueryCalendar.calendars[formId][otherCalendarName].calendarInstance.getOptions('inline')) {
								RSFormPro.jQueryCalendar.calendars[formId][otherCalendarName].calendarInstance.setOptions({value:startDateForceOther});
								RSFormPro.jQueryCalendar.calendars[formId][otherCalendarName].calendarInstance.setOptions({value:''});
							}
						}

						if (RSFormPro.jQueryCalendar.calendars[formId][calendarName].timepicker) {

							RSFormPro.jQueryCalendar.calendars[formId][otherCalendarName].useTimeLogic = {date: selectedOtherDate, time: selectedOtherTime, rule: operation};
						}
					}

					var selectedDateObject = {};
					selectedDateObject.selectedDate = selectedDate;
					// trigger function after all chages have been made (if the function si defined)
					if (typeof RSFormPro.jQueryCalendar.calendars[formId][calendarName].callbackSelectedDateTime == 'function') {
						var result = RSFormPro.jQueryCalendar.calendars[formId][calendarName].callbackSelectedDateTime(selectedDateObject, this, ct, $i, config.format);
						// reset the current calendar if the callback functions returns a false result
						if (typeof result != 'undefined' && !result) {
							hiddenDate.val('');
							RSFormPro.jQueryCalendar.calendars[formId][calendarName].currentDate = '';
							RSFormPro.jQueryCalendar.calendars[formId][calendarName].calendar.datetimepicker('reset');
							if (this.getOptions('mask')) {
								this.setOptions({mask:this.getOptions('mask')});
							}

							if (config.timepicker) {
								var checkTimePicker = this.getOptions('timepicker');
								if (checkTimePicker) {
									this.setOptions({timepicker: false});
								}
							}
							return false;
						}
					}

					hiddenDate.val(selectedDateObject.selectedDate);
					RSFormPro.jQueryCalendar.calendars[formId][calendarName].currentDate = selectedDateObject.selectedDate;
					
					// lose focus on selection
					jQuery(':focus').blur();
				},

				onShow: function() {
					var index = RSFormPro.jQueryCalendar.shownCalendars.indexOf(calendarId);
					if (index  < 0) {
						RSFormPro.jQueryCalendar.shownCalendars.push(calendarId);
					}
				},

				onClose: function() {
					var index = RSFormPro.jQueryCalendar.shownCalendars.indexOf(calendarId);
					if (index  > -1) {
						RSFormPro.jQueryCalendar.shownCalendars.splice(index, 1);
					}
				},

				onCreate: function() {
					if (startDate) {
						// if on load the specificTimeLogic is active
						if (RSFormPro.jQueryCalendar.calendars[formId][calendarName].useSpecificTimeLogic) {
							RSFormPro.jQueryCalendar.specificTimeLogic(this, startDate, RSFormPro.jQueryCalendar.calendars[formId][calendarName].useSpecificTimeLogic);
						}
						// if on load the timeLogic is active
						if (RSFormPro.jQueryCalendar.calendars[formId][calendarName].useTimeLogic) {
							var inputParams = {formId: formId, calendarName: calendarName, config: config};
							RSFormPro.jQueryCalendar.timeLogic(this, startDate, inputParams, RSFormPro.jQueryCalendar.calendars[formId][calendarName].useTimeLogic);
						}
					} else {
						this.setOptions({timepicker: false})
					}

					// hold the calendar instance so that users cand work with it
					RSFormPro.jQueryCalendar.calendars[formId][calendarName].calendarInstance =  this;
					
					// try and focus out other focused fields if anything is pressed inside the calendar, only when inline
					if (this.getOptions('inline'))
					{
						var currentCalendar = jQuery(this);

						currentCalendar.click(function (e) {
							if (jQuery(e.target).parents(".xdsoft_datetimepicker").length) {
								jQuery(':focus').blur();
							}
						});
					}
				},
				
				onGenerate: function(ct, $i){
					// focus time on popup calendar
					if (!config.inline){
						this.trigger('afterOpen.xdsoft');
					}
				}
			});
		}
	},

	// recontruct the timeLine form the datetimepicker.js
	generateTimeLine: function(selected, minTime, maxTime, step) {
		var now = new Date(selected.getTime());
		var dateFormat = now.dateFormat('MM/DD/YYYY');
		var i, j;

		var minTimeDate = RSFormPro.jQueryCalendar.stringToDate(dateFormat, false);
		var maxTimeDate = RSFormPro.jQueryCalendar.stringToDate(dateFormat, false);

		if (minTime) {
			var minTimeParts = minTime.split(':');
			minTimeDate.setHours(minTimeParts[0]);
			minTimeDate.setMinutes(minTimeParts[1]);
			minTimeDate.setSeconds(0);
		}

		if (maxTime) {
			var maxTimeParts = maxTime.split(':');
			maxTimeDate.setHours(maxTimeParts[0]);
			maxTimeDate.setMinutes(maxTimeParts[1]);
			maxTimeDate.setSeconds(0);
		}

		var timeLine = [];
		var newNow = now;
		var h, m;

		for (i = 0, j = 0; i < 24; i += 1) {
			for (j = 0; j < 60; j += step) {
				h = (i < 10 ? '0' : '') + i;
				m = (j < 10 ? '0' : '') + j;

				newNow.setHours(h);
				h = parseInt(newNow.getHours(), 10);
				newNow.setMinutes(m);
				m = parseInt(newNow.getMinutes(), 10);

				if (maxTime !== false && maxTimeDate.getTime() < newNow.getTime()) {
					continue;
				} else if (minTime !== false && minTimeDate.getTime() > newNow.getTime()) {
					continue;
				}

				timeLine.push(newNow.dateFormat('HH:mm'));
			}
		}

		return timeLine;
	},

	checkSelected: function(calendar, selectedDate, minTime, maxTime, step, timeLine) {
		var conditionMinDate = new Date.parseDate(selectedDate, 'MM/DD/YYYY HH:mm');
		var conditionMaxDate = new Date.parseDate(selectedDate, 'MM/DD/YYYY HH:mm');
		selectedDate = new Date.parseDate(selectedDate, 'MM/DD/YYYY HH:mm');

		//set the minTime
		if (minTime) {
			var minTimeParts = minTime.split(':');
			conditionMinDate.setHours(minTimeParts[0]);
			conditionMinDate.setMinutes(minTimeParts[1]);
			conditionMinDate.setSeconds(0);
		}

		// check if the selected date and time is less than the minimum set by the user
		var diffMin = selectedDate.getTime() - conditionMinDate.getTime();

		if (diffMin < 0) {
			return RSFormPro.jQueryCalendar.findInTimeLine(conditionMinDate, timeLine, step, minTime, maxTime); //.dateFormat('MM/DD/YYYY HH:mm');
		}

		//set the maxTime
		if (maxTime) {
			var maxTimeParts = maxTime.split(':');
			conditionMaxDate.setHours(maxTimeParts[0]);
			conditionMaxDate.setMinutes(maxTimeParts[1]);
			conditionMaxDate.setSeconds(0);
		}

		// check if the selected date and time is more than the maximum set by the user
		var diffMax = selectedDate.getTime() - conditionMaxDate.getTime();

		if (diffMax > 0) {
			return '';
		}

		return RSFormPro.jQueryCalendar.findInTimeLine(selectedDate, timeLine, step, minTime, maxTime); //.dateFormat('MM/DD/YYYY HH:mm');
	},

	findInTimeLine: function(newDate, timeLine, step, minTime, maxTime) {
		var dateHours = newDate.getHours();
		var dateMin = newDate.getMinutes();

		var arrayType = '';
		if (dateHours > 9) {
			arrayType += dateHours;
		} else {
			arrayType += '0'+dateHours;
		}
		arrayType +=':';
		if (dateMin > 9) {
			arrayType += dateMin;
		} else {
			arrayType += '0'+dateMin;
		}

		if (timeLine.indexOf(arrayType) > -1) {
			return newDate.dateFormat('MM/DD/YYYY HH:mm');
		}
		else {
			var timeFound = '';
			for(i = 0; i < timeLine.length; i++){
				var lineTime = timeLine[i].split(':');
				var lineH = parseInt(lineTime[0]);
				var lineM = parseInt(lineTime[1]);

				if (lineH == dateHours) {
					var diffMinutes = dateMin - lineM;
					if (diffMinutes < 0) diffMinutes = -diffMinutes;


					if (diffMinutes > step) {
						continue;
					} else {
						// check if the next timeLine entry is closer
						var middleStep = step / 2;

						if (diffMinutes > middleStep) {
							timeFound = timeLine[(i+1)];
						} else {
							timeFound = timeLine[i];
						}
						break;
					}
				}
			}

			// if the currentTime is less than the min of the timeline or higher than the max of the timeLine
			if (timeFound == '' && timeLine.length > 0) {
				var referenceMin = timeLine[0].replace(':', '');
				var referenceMax = timeLine[(timeLine.length - 1)].replace(':', '');
				var currentTime = dateHours.toString() + dateMin.toString();
				currentTime = parseInt(currentTime);

				if (currentTime < parseInt(referenceMin)) {
					timeFound = timeLine[0];
				} else if(currentTime > parseInt(referenceMax)) {
					timeFound = timeLine[(timeLine.length - 1)];
				}

			}
			if (typeof(timeFound) !== 'undefined' && timeFound != '') {
				timeFound = timeFound.split(':');
				newDate.setHours(timeFound[0]);
				newDate.setMinutes(timeFound[1]);
				newDate.setSeconds(0);

				return newDate.dateFormat('MM/DD/YYYY HH:mm');
			}
		}

		return newDate.dateFormat('MM/DD/YYYY HH:mm');
	},

	specificTimeLogic : function(element, currentDateTime, params) {
		if (params.minSpecificTime !='') {
			var refferenceDate = RSFormPro.jQueryCalendar.stringToDate(params.minDate, false);
			if (refferenceDate.getFullYear() == currentDateTime.getFullYear() && refferenceDate.getMonth() == currentDateTime.getMonth() && refferenceDate.getDate() == currentDateTime.getDate()) {
				element.setOptions({minTime:params.minSpecificTime});
			} else {
				element.setOptions({minTime:params.defaultMinTime});
			}
		}

		if (params.maxSpecificTime !='') {
			var refferenceDate = RSFormPro.jQueryCalendar.stringToDate(params.maxDate, false);
			if (refferenceDate.getFullYear() == currentDateTime.getFullYear() && refferenceDate.getMonth() == currentDateTime.getMonth() && refferenceDate.getDate() == currentDateTime.getDate()) {
				element.setOptions({maxTime:params.maxSpecificTime})
			} else {
				element.setOptions({maxTime:params.defaultMaxTime});
			}
		}
	},

	timeLogic: function(element, currentDateTime, inputParams, params) {
		var conditionDate = new Date.parseDate((params.date), 'MM/DD/YYYY');
		if (currentDateTime.getFullYear() == conditionDate.getFullYear() && currentDateTime.getMonth() == conditionDate.getMonth() && currentDateTime.getDate() == conditionDate.getDate()) {
			element.setOptions((params.rule == 'min' ? {minTime: params.time} : {maxTime: params.time}));
			// check the current time if is less then the minTime
			if (params.rule == 'min') {
				var timeParts = params.time.split(':');
				var h = parseInt(timeParts[0]);
				var min = parseInt(timeParts[1]);

				if (currentDateTime.getHours() < h || (currentDateTime.getHours() == h && currentDateTime.getMinutes() < min)) {
					currentDateTime.setHours(h);
					currentDateTime.setMinutes(min);
					currentDateTime.setSeconds(0);

					var outputInputDate = currentDateTime.dateFormat(inputParams.config.format);
					var outputHiddenDate = currentDateTime.dateFormat(inputParams.config.format);

					RSFormPro.jQueryCalendar.calendars[inputParams.formId][inputParams.calendarName].calendar.val(outputInputDate);
					RSFormPro.jQueryCalendar.calendars[inputParams.formId][inputParams.calendarName].hiddenDate.val(outputHiddenDate);
				}
			}
			if (params.rule == 'max') {
				var timeParts = params.time.split(':');
				var h = parseInt(timeParts[0]);
				var min = parseInt(timeParts[1]);

				if (currentDateTime.getHours() > h || (currentDateTime.getHours() == h && currentDateTime.getMinutes() > min)) {
					currentDateTime.setHours(h);
					currentDateTime.setMinutes(min);
					currentDateTime.setSeconds(0);

					var outputInputDate = currentDateTime.dateFormat(inputParams.config.format);
					var outputHiddenDate = currentDateTime.dateFormat(inputParams.config.format);

					RSFormPro.jQueryCalendar.calendars[inputParams.formId][inputParams.calendarName].calendar.val(outputInputDate);
					RSFormPro.jQueryCalendar.calendars[inputParams.formId][inputParams.calendarName].hiddenDate.val(outputHiddenDate);
				}
			}
		} else {
			var minTime = typeof inputParams.config.extra.minTime != 'undefined' ? inputParams.config.extra.minTime : false;
			var maxTime = typeof inputParams.config.extra.maxTime != 'undefined' ? inputParams.config.extra.maxTime : false;
			element.setOptions((params.rule == 'min' ? {minTime: minTime} : {maxTime: maxTime}));
		}
	},

	stringToDate: function(date, withTime) {
		var newDate = false;
		if (typeof date != 'undefined' && date != '') {
			if (!withTime) {
				newDate = new Date.parseDate(date, 'MM/DD/YYYY');
			} else {
				var parts = date.split(' ');
				if (parts.length == 2) {
					newDate = new Date.parseDate(date, 'MM/DD/YYYY HH:mm');
				} else {
					newDate = RSFormPro.jQueryCalendar.stringToDate(date, false);
				}
			}
		}
		return newDate;
	},

	showCalendar: function(calendarId) {
		var index = RSFormPro.jQueryCalendar.shownCalendars.indexOf(('cal'+calendarId));
		if (index > -1) {
			jQuery('#txtjQcal' + calendarId).datetimepicker('hide');
			RSFormPro.jQueryCalendar.shownCalendars.splice(index, 1);
		} else {
			jQuery('#txtjQcal' + calendarId).datetimepicker('show');
		}
	},

	hideAllPopupCalendars: function(formId) {
		if (typeof RSFormPro.jQueryCalendar.calendars[formId] != 'undefined') {
			jQuery.each(RSFormPro.jQueryCalendar.calendars[formId], function () {
				if (!this.calendarInstance.getOptions('inline')) {
					this.calendarInstance.trigger('close.xdsoft');
				}
			});
		}
	},

	shownCalendars: []
};

Youez - 2016 - github.com/yon3zu
LinuXploit