<?xml version="1.0"?><!-- generator="bbPress" -->

<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
>

<channel>
<title>MachForm Community Forums Topic: Calendar Past-Date Issue</title>
<link>https://www.machform.com/forums/</link>
<description>MachForm Community Forums Topic: Calendar Past-Date Issue</description>
<language>en</language>
<pubDate>Tue, 05 May 2026 05:54:35 +0000</pubDate>

<item>
<title>sjones on "Calendar Past-Date Issue"</title>
<link>https://www.machform.com/forums/topic/calendar-date-issue#post-6754</link>
<pubDate>Wed, 29 Jul 2009 23:43:16 +0000</pubDate>
<dc:creator>sjones</dc:creator>
<guid isPermaLink="false">6754@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Okay, I hate to be more trouble, but I have a couple more questions.&#60;/p&#62;
&#60;p&#62;Firstly let's say I have 6 forms, 3 of which I don't care what date is picked, and 3 that will not allow a date before today to be picked.  The calendar.js file resides in another subdirectory and all forms seem to share it.  If I put in the code to stop earlier dates, that means my 3 forms that don't care which date is picked, also get blocked. I tried moving calendar.js to form 1's directory (as a test) but then the calendar function would not work so I moved it back.&#60;/p&#62;
&#60;p&#62;Also, since this is for a hotel reservation system, I realized that I really don't want reservations taken for tomorrow, today or previous days, not just previous days.  I could not figure out how to manipulate the code to allow this.&#60;/p&#62;
&#60;p&#62;Thanks
&#60;/p&#62;</description>
</item>
<item>
<title>sjones on "Calendar Past-Date Issue"</title>
<link>https://www.machform.com/forums/topic/calendar-date-issue#post-6744</link>
<pubDate>Wed, 29 Jul 2009 05:11:22 +0000</pubDate>
<dc:creator>sjones</dc:creator>
<guid isPermaLink="false">6744@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;That worked great Yuniar.  Thanks.
&#60;/p&#62;</description>
</item>
<item>
<title>yuniar on "Calendar Past-Date Issue"</title>
<link>https://www.machform.com/forums/topic/calendar-date-issue#post-6718</link>
<pubDate>Sun, 26 Jul 2009 10:00:33 +0000</pubDate>
<dc:creator>yuniar</dc:creator>
<guid isPermaLink="false">6718@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;That seems to be true for the newest version of the calendar script, which I just realized it's no longer free to use :(&#60;/p&#62;
&#60;p&#62;Anyhow, try to do this, edit your calendar.js file, search around line 1804, you will find this function:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;function selectDate(cal) {
	var p = cal.params;
	var update = (cal.dateClicked &#124;&#124; p.electric);
	year = p.inputField.id;

	day = p.baseField + &#38;#39;_2&#38;#39;;
	month = p.baseField + &#38;#39;_1&#38;#39;;

	document.getElementById(month).value = cal.date.print(&#38;#39;%m&#38;#39;);
	document.getElementById(day).value = cal.date.print(&#38;#39;%e&#38;#39;);
	document.getElementById(year).value = cal.date.print(&#38;#39;%Y&#38;#39;);
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;change that block of code with this one:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;function selectDate(cal) {
	var p = cal.params;
	var update = (cal.dateClicked &#124;&#124; p.electric);
	year = p.inputField.id;
	day = p.baseField + &#38;#39;_2&#38;#39;;
	month = p.baseField + &#38;#39;_1&#38;#39;;

	var today = new Date();
	if(cal.date &#38;lt; today){
    	alert(&#38;#39;You can not choose past date!&#38;#39;);
    	return false;
    }	

	document.getElementById(month).value = cal.date.print(&#38;#39;%m&#38;#39;);
	document.getElementById(day).value = cal.date.print(&#38;#39;%e&#38;#39;);
	document.getElementById(year).value = cal.date.print(&#38;#39;%Y&#38;#39;);
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;that should set your calendar to not allow past dates selection.
&#60;/p&#62;</description>
</item>
<item>
<title>sjones on "Calendar Past-Date Issue"</title>
<link>https://www.machform.com/forums/topic/calendar-date-issue#post-6716</link>
<pubDate>Sun, 26 Jul 2009 01:38:18 +0000</pubDate>
<dc:creator>sjones</dc:creator>
<guid isPermaLink="false">6716@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Bump.&#60;/p&#62;
&#60;p&#62;Hoping someone has an answer for this problem. The calendar developer's website says to put the following in to limit dates that can be picked from a calendar.:&#60;/p&#62;
&#60;p&#62;Calendar.setup({&#60;br /&#62;
    cont: &#34;sample1&#34;,&#60;br /&#62;
    min: 20090726,&#60;br /&#62;
    max: 20091225&#60;br /&#62;
});&#60;br /&#62;
Unfortunately this would mean me going in every day and changing the MIN value.  Surely there is some sort of command that sets the current date as the minumum date.&#60;/p&#62;
&#60;p&#62;Thanks you.
&#60;/p&#62;</description>
</item>
<item>
<title>sjones on "Calendar Past-Date Issue"</title>
<link>https://www.machform.com/forums/topic/calendar-date-issue#post-6680</link>
<pubDate>Thu, 23 Jul 2009 06:39:01 +0000</pubDate>
<dc:creator>sjones</dc:creator>
<guid isPermaLink="false">6680@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Hello Yuniar.  I just realized that users can select dates previous to today's date, when filling out a form.  I did a search through this forum and another user questioned whether you could limit start dates and end dates.  You directed them to the calendar developer's site.  The instructions for the calendar product states you can input a min start date and max end date, but I would have to update the js code daily.  This is not a viable option.&#60;/p&#62;
&#60;p&#62;I also see, on that site, that three users have asked similar questions, but no answer.  I have re-asked the question and hopefully will receive a response.  Their support seems no where as good as yours.  I also noted they now have a newer version of the calendar out and no longer support the version you have implemented into machforms.
&#60;/p&#62;</description>
</item>

</channel>
</rss>
