<?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: Where to add datepicker custom javascript?</title>
		<link>https://legacy.forums.gravityhelp.com/topic/where-to-add-datepicker-custom-javascript</link>
		<description>Gravity Support Forums Topic: Where to add datepicker custom javascript?</description>
		<language>en-US</language>
		<pubDate>Tue, 21 Apr 2026 05:52:01 +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/where-to-add-datepicker-custom-javascript" rel="self" type="application/rss+xml" />

		<item>
			<title>Rob Harrell on "Where to add datepicker custom javascript?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/where-to-add-datepicker-custom-javascript#post-52959</link>
			<pubDate>Tue, 20 Mar 2012 08:52:04 +0000</pubDate>
			<dc:creator>Rob Harrell</dc:creator>
			<guid isPermaLink="false">52959@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Awesome, thanks for letting us know.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Fika on "Where to add datepicker custom javascript?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/where-to-add-datepicker-custom-javascript#post-52956</link>
			<pubDate>Tue, 20 Mar 2012 08:46:30 +0000</pubDate>
			<dc:creator>Fika</dc:creator>
			<guid isPermaLink="false">52956@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Actually I was able to get this all working in the end. &#60;/p&#62;
&#60;p&#62;Thanks
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Fika on "Where to add datepicker custom javascript?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/where-to-add-datepicker-custom-javascript#post-52664</link>
			<pubDate>Fri, 16 Mar 2012 11:16:51 +0000</pubDate>
			<dc:creator>Fika</dc:creator>
			<guid isPermaLink="false">52664@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi Rob,&#60;/p&#62;
&#60;p&#62;After figuring out the exact JavaScript I need to use I am getting a conflict (i think) when loading the script globally in the header or footer using the above WP plugin. &#60;/p&#62;
&#60;p&#62;It would be good if I can do it the way you were suggesting?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Fika on "Where to add datepicker custom javascript?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/where-to-add-datepicker-custom-javascript#post-52524</link>
			<pubDate>Thu, 15 Mar 2012 08:00:33 +0000</pubDate>
			<dc:creator>Fika</dc:creator>
			<guid isPermaLink="false">52524@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi Rob,&#60;/p&#62;
&#60;p&#62;Thanks for the suggestions. I actually found it easier to get a plugin &#34;CSS &#38;amp; JavaScript Toolbox&#34; which allows me to insert code snippets to the templates without mucking around in the code. That also helps me out with theme updates not overiding my changes. &#60;/p&#62;
&#60;p&#62;Only issue I have left is formatting the date the way I need to . I asked about that here &#60;a href=&#34;http://www.gravityhelp.com/forums/topic/how-to-format-date-as-full-dd-d-mm-yy-in-date-picker&#34; rel=&#34;nofollow&#34;&#62;http://www.gravityhelp.com/forums/topic/how-to-format-date-as-full-dd-d-mm-yy-in-date-picker&#60;/a&#62; if you have any suggestions would be great to hear...&#60;/p&#62;
&#60;p&#62;Cheers&#60;/p&#62;
&#60;p&#62;Plugin Ref: &#60;a href=&#34;http://wordpress.org/extend/plugins/css-javascript-toolbox/&#34; rel=&#34;nofollow&#34;&#62;http://wordpress.org/extend/plugins/css-javascript-toolbox/&#60;/a&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Rob Harrell on "Where to add datepicker custom javascript?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/where-to-add-datepicker-custom-javascript#post-52516</link>
			<pubDate>Thu, 15 Mar 2012 07:09:17 +0000</pubDate>
			<dc:creator>Rob Harrell</dc:creator>
			<guid isPermaLink="false">52516@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Well, I would think you could try it a couple of ways. You could make an isolated page template for forms that does just include this script there and there only to avoid it being placed globally.&#60;/p&#62;
&#60;p&#62;Or you could place it globally in the head or footer - does your theme already have any sort of JS functions file?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Fika on "Where to add datepicker custom javascript?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/where-to-add-datepicker-custom-javascript#post-52511</link>
			<pubDate>Thu, 15 Mar 2012 05:52:45 +0000</pubDate>
			<dc:creator>Fika</dc:creator>
			<guid isPermaLink="false">52511@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hello,&#60;/p&#62;
&#60;p&#62;I am trying to customize by datepicker to block national holidays and some other useful dates which I don't want people to be allowed to select. I don't see this functionality in Gravity Forms datepicker so I would like to know where to add my javascript?&#60;/p&#62;
&#60;p&#62;I have searched the forums and it says put in in your page template. I don't want to get out of my depth by just placing it anywhere. Would you be able to direct me to the template I should be editing to add this code or maybe I can do it directly in gravity forms via some snippet or something?&#60;/p&#62;
&#60;p&#62;Thanks &#60;/p&#62;
&#60;p&#62;Code I am trying to add:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;&#38;lt;script type=&#38;quot;text/javascript&#38;quot;&#38;gt;
jQuery.noConflict();
  jQuery(document).ready(function($) {

$(&#38;quot;.selector&#38;quot;).datepicker({ beforeShowDay: nationalDays})   

natDays = [
  [1, 26, &#38;#39;au&#38;#39;], [2, 6, &#38;#39;nz&#38;#39;], [3, 17, &#38;#39;ie&#38;#39;],
  [4, 27, &#38;#39;za&#38;#39;], [5, 25, &#38;#39;ar&#38;#39;], [6, 6, &#38;#39;se&#38;#39;],
  [7, 4, &#38;#39;us&#38;#39;], [8, 17, &#38;#39;id&#38;#39;], [9, 7, &#38;#39;br&#38;#39;],
  [10, 1, &#38;#39;cn&#38;#39;], [11, 22, &#38;#39;lb&#38;#39;], [12, 12, &#38;#39;ke&#38;#39;]
];

function nationalDays(date) {
    for (i = 0; i &#38;lt; natDays.length; i++) {
      if (date.getMonth() == natDays[i][0] - 1
          &#38;amp;&#38;amp; date.getDate() == natDays[i][1]) {
        return [false, natDays[i][2] + &#38;#39;_day&#38;#39;];
      }
    }
  return [true, &#38;#39;&#38;#39;];
}

  });
&#38;lt;/script&#38;gt;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Code grabbed from here &#60;a href=&#34;http://stackoverflow.com/questions/501943/can-the-jquery-ui-datepicker-be-made-to-disable-saturdays-and-sundays-and-holid&#34; rel=&#34;nofollow&#34;&#62;http://stackoverflow.com/questions/501943/can-the-jquery-ui-datepicker-be-made-to-disable-saturdays-and-sundays-and-holid&#60;/a&#62;
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
