<?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: jQuery DatePicker No Weekends</title>
		<link>https://legacy.forums.gravityhelp.com/topic/jquery-datepicker-no-weekends</link>
		<description>Gravity Support Forums Topic: jQuery DatePicker No Weekends</description>
		<language>en-US</language>
		<pubDate>Mon, 20 Apr 2026 04:51:54 +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/jquery-datepicker-no-weekends" rel="self" type="application/rss+xml" />

		<item>
			<title>Chris Hajer on "jQuery DatePicker No Weekends"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/jquery-datepicker-no-weekends#post-92198</link>
			<pubDate>Sat, 17 Nov 2012 01:52:51 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">92198@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Thank you for sharing your solution.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>randomtype on "jQuery DatePicker No Weekends"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/jquery-datepicker-no-weekends#post-91132</link>
			<pubDate>Wed, 14 Nov 2012 13:09:08 +0000</pubDate>
			<dc:creator>randomtype</dc:creator>
			<guid isPermaLink="false">91132@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I've had a similar need but rather than destroy the existing datepicker bindings I found you can add options to input elements after they've been initialized with a datepicker by adding an option to it on the load event of the window object rather than the ready event of the document object like most people do. Also, I only wanted to block out sundays in my case but my code can be generalized for blocking any day of the week on a recurring basis:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;&#38;lt;script type=&#38;quot;text/javascript&#38;quot;&#38;gt;
function noSundaysOrSaturdays(date) {
	var weekday=new Array(7);
	weekday[0]=&#38;quot;Sunday&#38;quot;;
	weekday[1]=&#38;quot;Monday&#38;quot;;
	weekday[2]=&#38;quot;Tuesday&#38;quot;;
	weekday[3]=&#38;quot;Wednesday&#38;quot;;
	weekday[4]=&#38;quot;Thursday&#38;quot;;
	weekday[5]=&#38;quot;Friday&#38;quot;;
	weekday[6]=&#38;quot;Saturday&#38;quot;;
	//console.log(weekday[date.getDay()]);
	if(weekday[date.getDay()] == &#38;#39;Sunday&#38;#39;) {
		return [false, &#38;#39;&#38;#39;, &#38;#39;Not open on Sundays&#38;#39;];
        }else if(weekday[date.getDay()] == &#38;#39;Saturday&#38;#39;) {
                 return [false, &#38;#39;&#38;#39;, &#38;#39;Not open on Saturdays&#38;#39;];
        }

	return [true];
}
jQuery(window).load(function(){
	jQuery(&#38;#39;.hasDatepicker&#38;#39;).datepicker(&#38;#39;option&#38;#39;, &#38;#39;beforeShowDay&#38;#39;, noSundays);
});
&#38;lt;/script&#38;gt;&#60;/code&#62;&#60;/pre&#62;</description>
		</item>
		<item>
			<title>Kevin Flahaut on "jQuery DatePicker No Weekends"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/jquery-datepicker-no-weekends#post-82679</link>
			<pubDate>Mon, 22 Oct 2012 12:55:10 +0000</pubDate>
			<dc:creator>Kevin Flahaut</dc:creator>
			<guid isPermaLink="false">82679@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;The date picker is the default jQuery UI datepicker. Documentation for that can be found here &#60;a href=&#34;http://jqueryui.com/datepicker/&#34; rel=&#34;nofollow&#34;&#62;http://jqueryui.com/datepicker/&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;You can include some jQuery settings in your template page to limit the date range, etc. That should be all you need to do. Examples are provided at that URL.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Ian Rogers on "jQuery DatePicker No Weekends"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/jquery-datepicker-no-weekends#post-82678</link>
			<pubDate>Mon, 22 Oct 2012 12:52:30 +0000</pubDate>
			<dc:creator>Ian Rogers</dc:creator>
			<guid isPermaLink="false">82678@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I have used the gform_post_render function to create a custom datepicker using the minDate option for selection of 1 day in advance: &#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://www.gravityhelp.com/documentation/page/Gform_post_render&#34; rel=&#34;nofollow&#34;&#62;http://www.gravityhelp.com/documentation/page/Gform_post_render&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Is there a way that I can exclude weekends? I only want the user to be able to select weekdays with one day ahead. I have tried using the &#60;code&#62;beforeShowDay: $.datepicker.noWeekends&#60;/code&#62; but that seems to conflict with &#60;code&#62;minDate&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;Here is my form: &#60;a href=&#34;http://www.discountdumpsters.com/shop/30-yard-dumpster/&#34; rel=&#34;nofollow&#34;&#62;http://www.discountdumpsters.com/shop/30-yard-dumpster/&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;And here is my code:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;&#38;lt;script type=&#38;quot;text/javascript&#38;quot;&#38;gt;
jQuery(document).bind(&#38;#39;gform_post_render&#38;#39;, function(){
	// destroy default Gravity Form datepicker
	jQuery(&#38;quot;#input_1_1&#38;quot;).datepicker(&#38;#39;destroy&#38;#39;);
	// create new custom datepicker
	jQuery(&#38;quot;#input_1_1&#38;quot;).datepicker({ defaultDate: &#38;#39;+1d&#38;#39;, minDate: &#38;#39;+1d&#38;#39;, gotoCurrent: true, prevText: &#38;#39;&#38;#39;, showOn: &#38;#39;both&#38;#39;, buttonImage: &#38;#39;http://www.discountdumpsters.com/wp-content/plugins/gravityforms/images/calendar.png&#38;#39;, buttonImageOnly: true });
});
&#38;lt;/script&#38;gt;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Any help would be appreciated...thanks!
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
