<?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: Limit Value of Dropdown based on DayOfTheWeek selected from DatePicker</title>
		<link>https://legacy.forums.gravityhelp.com/topic/limit-value-of-dropdown-based-on-dayoftheweek-selected-from-datepicker</link>
		<description>Gravity Support Forums Topic: Limit Value of Dropdown based on DayOfTheWeek selected from DatePicker</description>
		<language>en-US</language>
		<pubDate>Mon, 20 Apr 2026 03:27:27 +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/limit-value-of-dropdown-based-on-dayoftheweek-selected-from-datepicker" rel="self" type="application/rss+xml" />

		<item>
			<title>Chris Hajer on "Limit Value of Dropdown based on DayOfTheWeek selected from DatePicker"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/limit-value-of-dropdown-based-on-dayoftheweek-selected-from-datepicker#post-105506</link>
			<pubDate>Fri, 21 Dec 2012 18:09:12 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">105506@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Thank you for posting your solution.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>rdeguzman on "Limit Value of Dropdown based on DayOfTheWeek selected from DatePicker"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/limit-value-of-dropdown-based-on-dayoftheweek-selected-from-datepicker#post-105329</link>
			<pubDate>Fri, 21 Dec 2012 07:10:15 +0000</pubDate>
			<dc:creator>rdeguzman</dc:creator>
			<guid isPermaLink="false">105329@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Figured it out at the end using a bit of Jquery, JS and OOTB functionality from Gravity Forms.&#60;/p&#62;
&#60;p&#62;Created another field called Day Of The Week, but made it readonly prior to setting the value and post setting the value of the input field.&#60;/p&#62;
&#60;p&#62;Day Of The Week is then filled in based on selected date. See below.&#60;/p&#62;
&#60;blockquote&#62;&#60;p&#62;
    	// Array for the name of the Weekday&#60;br /&#62;
   	var weekday=new Array(7);&#60;br /&#62;
	weekday[0]=&#34;Sunday&#34;;&#60;br /&#62;
	weekday[1]=&#34;Monday&#34;;&#60;br /&#62;
	weekday[2]=&#34;Tuesday&#34;;&#60;br /&#62;
	weekday[3]=&#34;Wednesday&#34;;&#60;br /&#62;
	weekday[4]=&#34;Thursday&#34;;&#60;br /&#62;
	weekday[5]=&#34;Friday&#34;;&#60;br /&#62;
	weekday[6]=&#34;Saturday&#34;;&#60;/p&#62;
&#60;p&#62;        // set Day Of The Week field to readonly prior to picking a date&#60;br /&#62;
	jQuery(&#34;#input_1_18&#34;).attr(&#34;readonly&#34;, true);&#60;/p&#62;
&#60;p&#62;	// On select of a date in datepicker move value to Day Of The Week&#60;br /&#62;
    	jQuery(&#34;#input_1_7&#34;).change(function(){&#60;/p&#62;
&#60;p&#62;	var date = jQuery(&#34;#input_1_7&#34;).datepicker('getDate');&#60;br /&#62;
    	var dayOfWeek = weekday[date.getUTCDay()];&#60;/p&#62;
&#60;p&#62;       // Make Day Of The Week editable&#60;br /&#62;
	jQuery(&#34;#input_1_18&#34;).attr(&#34;readonly&#34;, false);&#60;br /&#62;
       // Set Day Of The Week but emulate keyup&#60;br /&#62;
	jQuery(&#34;#input_1_18&#34;).val(dayOfWeek).keyup();&#60;br /&#62;
       // Make Day Of The Week readonly again so users cant change it&#60;br /&#62;
	jQuery(&#34;#input_1_18&#34;).attr(&#34;readonly&#34;, true);&#60;/p&#62;
&#60;p&#62;    	});
&#60;/p&#62;&#60;/blockquote&#62;
&#60;p&#62;I just used the OOTB gravity forms functionality to then show the required Appointment Time dropdown list based on value of Day Of The Week (Mon-Thu vs Fri-Sat). The trick is to emulate a user entering the Day Of The Week, otherwise, Gravity Forms won't trigger the condition. Hence, added .keyup after setting the field value and Voila! It works great!&#60;/p&#62;
&#60;p&#62;Might be an easier way and more efficient way of doing this, but ho-hum.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>rdeguzman on "Limit Value of Dropdown based on DayOfTheWeek selected from DatePicker"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/limit-value-of-dropdown-based-on-dayoftheweek-selected-from-datepicker#post-105118</link>
			<pubDate>Thu, 20 Dec 2012 18:30:47 +0000</pubDate>
			<dc:creator>rdeguzman</dc:creator>
			<guid isPermaLink="false">105118@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi All.&#60;/p&#62;
&#60;p&#62;So have been playing with DatePicker and have managed to make &#34;Requested Appointment Date&#34; to now only allow Monday to Saturday as selectable days.&#60;/p&#62;
&#60;p&#62;See here: &#60;a href=&#34;http://marymebridal.com/appointments/&#34; rel=&#34;nofollow&#34;&#62;http://marymebridal.com/appointments/&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;What I want to do next is based on the DayOfTheWeek of the selected date from the &#34;Requested Appointment Date&#34;, I want to be able to then restrict the list values of the dropdown for &#34;Requested Appointment Time&#34;.&#60;/p&#62;
&#60;p&#62;I have two sets of time based on Mon-Thu and Fri-Sat. So depending on the DOTW of the selected date, I want to be able to only show the relevant time slots.&#60;/p&#62;
&#60;p&#62;Any ideas on how I can easily achieve this? or at least point me in the right direction? Been looking at pre_render and post_render but no luck.&#60;/p&#62;
&#60;p&#62;Thanks in advance for any feedback and assistance.
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
