<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.1" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Gravity Support Forums Topic: Execute a JS/jQuery function on focus</title>
		<link>https://legacy.forums.gravityhelp.com/topic/execute-a-jsjquery-function-on-fucus</link>
		<description>Gravity Support Forums Topic: Execute a JS/jQuery function on focus</description>
		<language>en-US</language>
		<pubDate>Sat, 04 Apr 2026 08:30:30 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.1</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>https://legacy.forums.gravityhelp.com/search.php</link>
		</textInput>
		<atom:link href="https://legacy.forums.gravityhelp.com/rss/topic/execute-a-jsjquery-function-on-fucus" rel="self" type="application/rss+xml" />

		<item>
			<title>Richard Vav on "Execute a JS/jQuery function on focus"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/execute-a-jsjquery-function-on-fucus#post-254902</link>
			<pubDate>Thu, 16 May 2013 01:34:44 +0000</pubDate>
			<dc:creator>Richard Vav</dc:creator>
			<guid isPermaLink="false">254902@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;You're welcome
&#60;/p&#62;</description>
		</item>
		<item>
			<title>jkirker on "Execute a JS/jQuery function on focus"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/execute-a-jsjquery-function-on-fucus#post-254462</link>
			<pubDate>Wed, 15 May 2013 17:20:45 +0000</pubDate>
			<dc:creator>jkirker</dc:creator>
			<guid isPermaLink="false">254462@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Thanks Richard,&#60;/p&#62;
&#60;p&#62;I got it working...&#60;/p&#62;
&#60;p&#62;For anyone else....  Here's what I did...&#60;/p&#62;
&#60;p&#62;Script above and:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;&#38;lt;script&#38;gt;
jQuery(&#38;#39;#input_2_75&#38;#39;).one(&#38;#39;focus&#38;#39;,function() {
  disableDays(&#38;#39;#input_2_75&#38;#39;,[0,6],&#38;#39;+4d&#38;#39;)
});
&#38;lt;/script&#38;gt;&#60;/code&#62;&#60;/pre&#62;</description>
		</item>
		<item>
			<title>Richard Vav on "Execute a JS/jQuery function on focus"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/execute-a-jsjquery-function-on-fucus#post-254430</link>
			<pubDate>Wed, 15 May 2013 15:47:20 +0000</pubDate>
			<dc:creator>Richard Vav</dc:creator>
			<guid isPermaLink="false">254430@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Could you not use the &#60;a href=&#34;http://api.jquery.com/focus/&#34; rel=&#34;nofollow&#34;&#62;jQuery focus method&#60;/a&#62;.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>jkirker on "Execute a JS/jQuery function on focus"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/execute-a-jsjquery-function-on-fucus#post-254428</link>
			<pubDate>Wed, 15 May 2013 15:42:10 +0000</pubDate>
			<dc:creator>jkirker</dc:creator>
			<guid isPermaLink="false">254428@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I have some jQuery that I need to execute onFocus for the datepicker which will block out days.  &#60;/p&#62;
&#60;p&#62;Here's the jQuery that I'm running on the page:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;&#38;lt;script&#38;gt;
function disableDays(selector,days,min) {
    var $ = jQuery;    
    var daysToDisable = days; // [5, 6] // Sat &#38;amp; Sun   

    function disableSpecificWeekDays(date) {        
        var day = date.getDay();        
        for (i = 0; i &#38;lt; daysToDisable.length; i++) {          
            if ($.inArray(day, daysToDisable) != -1) {            
                return [false];          
            }        
        }        
        return [true];      
    }

    $(selector).datepicker(&#38;#39;option&#38;#39;, &#38;#39;beforeShowDay&#38;#39;, disableSpecificWeekDays);
    $(selector).datepicker(&#38;#39;option&#38;#39;, &#38;#39;minDate&#38;#39;, min);
}
&#38;lt;/script&#38;gt;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;I need to execute this function on focus for Field ID 75 &#60;/p&#62;
&#60;p&#62;How do I add this to the datepicker input?&#60;br /&#62;
&#60;code&#62;onfocus=&#38;#39;(disableDays(&#38;#39;#input_2_75&#38;#39;,[5,6],&#38;#39;+4d&#38;#39;);):&#38;quot;&#60;/code&#62;
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
