<?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: add second date (might have been posted twice)</title>
		<link>https://legacy.forums.gravityhelp.com/topic/add-second-date-might-have-been-posted-twice</link>
		<description>Gravity Support Forums Topic: add second date (might have been posted twice)</description>
		<language>en-US</language>
		<pubDate>Tue, 21 Apr 2026 03:54: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/add-second-date-might-have-been-posted-twice" rel="self" type="application/rss+xml" />

		<item>
			<title>David Peralty on "add second date (might have been posted twice)"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/add-second-date-might-have-been-posted-twice#post-68247</link>
			<pubDate>Fri, 27 Jul 2012 14:17:09 +0000</pubDate>
			<dc:creator>David Peralty</dc:creator>
			<guid isPermaLink="false">68247@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;You can set CSS classes on those fields so you can target things. The javascript code should go in your theme's header.php or in your functions.php file and hook into the wp_head call.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>K Schroeder on "add second date (might have been posted twice)"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/add-second-date-might-have-been-posted-twice#post-68246</link>
			<pubDate>Fri, 27 Jul 2012 14:08:44 +0000</pubDate>
			<dc:creator>K Schroeder</dc:creator>
			<guid isPermaLink="false">68246@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;David, i'm not sure where the jquery int for date picker should or how it can know which datepicker is which. Can i look for the named css class at pre-render then call a queued script to reset the datpicker with passed in values?&#60;/p&#62;
&#60;p&#62;And thank you for answering it is apprecuated!!&#60;br /&#62;
Kim
&#60;/p&#62;</description>
		</item>
		<item>
			<title>K Schroeder on "add second date (might have been posted twice)"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/add-second-date-might-have-been-posted-twice#post-68244</link>
			<pubDate>Fri, 27 Jul 2012 14:01:41 +0000</pubDate>
			<dc:creator>K Schroeder</dc:creator>
			<guid isPermaLink="false">68244@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;thank you. populating the date is not necessary, but setting dates off is another issue. the sample is crude, but works for demo. i'll use ajax function in word press to get data or create my own if necessary. to populate the array with needed values.&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;jQuery(document).ready(gformInitDatepicker);
var unavailableDates = [&#38;quot;28-7-2012&#38;quot;,&#38;quot;29-7-2012&#38;quot;,&#38;quot;30-7-2012&#38;quot;];

function gformInitDatepicker(){
    jQuery(&#38;#39;.datepicker&#38;#39;).each(
        function (){
            var element = jQuery(this);
            var format = &#38;quot;mm/dd/yy&#38;quot;;
            var mDays = 2;
            var image = &#38;quot;&#38;quot;;
            var showOn = &#38;quot;focus&#38;quot;;
            if(element.hasClass(&#38;quot;datepicker_with_icon&#38;quot;)){
                showOn = &#38;quot;both&#38;quot;;
                image = jQuery(&#38;#39;#gforms_calendar_icon_&#38;#39; + this.id).val();
            }
            var opts = ttgSetDateOptions(element);
            opts.beforeShowDay = unavailable;
            element.datepicker(opts );
        }

    );
}

function unavailable(date) {
    dmy = date.getDate() + &#38;quot;-&#38;quot; + (date.getMonth()+1) + &#38;quot;-&#38;quot; + date.getFullYear();
    if (jQuery.inArray(dmy, unavailableDates) &#38;lt; 0) {
        return [true,&#38;quot;&#38;quot;,&#38;quot;out&#38;quot;];
    } else {
        return [false,&#38;quot;&#38;quot;,&#38;quot;in&#38;quot;];
    }
}

function ttgSetDateOptions(date) {
    var image = &#38;quot;&#38;quot;;
    var showOn = &#38;quot;focus&#38;quot;;
    var thsoptions =  {
        duration: &#38;quot;slow&#38;quot;,
        hideIfNoPrevNext: true,
        yearRange: &#38;#39;-0:+0&#38;#39;,
        minDate: +2,
        maxDate: 30,
        gotoCurrent: false,
        defaultDate: +2,
        showOn: showOn,
        buttonImage: image,
        buttonImageOnly: false,
        dateFormat: &#38;quot;mm/dd/yy&#38;quot;
    }

    return thsoptions;
}&#60;/code&#62;&#60;/pre&#62;</description>
		</item>
		<item>
			<title>David Peralty on "add second date (might have been posted twice)"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/add-second-date-might-have-been-posted-twice#post-68232</link>
			<pubDate>Fri, 27 Jul 2012 12:58:30 +0000</pubDate>
			<dc:creator>David Peralty</dc:creator>
			<guid isPermaLink="false">68232@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;You can easily add two date fields, and using JQuery, you can control which dates are available. I am not sure how easy/difficult it is to dynamically populate a date field.&#60;/p&#62;
&#60;p&#62;Here is the date picker script we use:&#60;br /&#62;
&#60;a href=&#34;http://jqueryui.com/demos/datepicker/&#34; rel=&#34;nofollow&#34;&#62;http://jqueryui.com/demos/datepicker/&#60;/a&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>K Schroeder on "add second date (might have been posted twice)"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/add-second-date-might-have-been-posted-twice#post-68229</link>
			<pubDate>Fri, 27 Jul 2012 12:36:47 +0000</pubDate>
			<dc:creator>K Schroeder</dc:creator>
			<guid isPermaLink="false">68229@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I need to add two date pickers with different dates blocked out. Does any one have any ideas how this can be done using dynamic fill option?
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
