» Forums
» The DHTML Calendar
» General discussion
General discussion
2004/09/27 14:21
Viewed 85407 times
Replies: 508/1014

Any questions, wishes, bug reports, etc. should go here.

Not selectable dates
2004/10/01 06:43
Viewed 60578 times
Replies: 4/18

Is it possible to creat e only a window of dates that the site visitor can select. For instance: a camping site is openonly from May 1st, thru Sep 30.
It would be nice that in case of making a reservation the dates before May 1st are not selecteble. Also voor the dates after Sep 30.

last
Re: Not selectable dates
2004/10/01 11:49
Viewed 67715 times
Replies: 5/13

Yes, this is possible.

You have to provide a function that takes a date and returns that day's status, so that the calendar knows wether to disable it or not.  Here's some sample code:

function dateStatus(date) {
var min = new Date(2004,09,30);
var max = new Date(2004,10,05);
if (date.getTime() < min.getTime() ||
date.getTime() > max.getTime())
return true; // true says "disable"
else
return false; // leave other dates enabled
}

Then you need to include this function at Calendar.setup(), like this:

Calendar.setup({
...
dateStatusFunc : dateStatus
...
});

The calendar will call this function for each date in a month and, depending on the result, it will take an action on that date: if your function returns true then the date will be disabled, if it returns false then nothing happens and if it returns a string then that string will be appended to the date's CSS class, thus allowing you to have some “special

last
Show / Hide methods
2006/04/26 17:40
Viewed 44593 times
Replies: 1/1
by Oleh

Hi Folks! I have one problem: cant call Show / Hide calendar methods... All the time getting message: "Object doesnt support this property or method".

So my question: Is it possible to hide popup (flat) calendar onClick?
something like: <input type="button" value="hide" onClick="hideLayer('calendar-container');return false">

same for show...

thanks everybody...

last
Highlight Friday instead of Sunday
2008/01/12 14:06
Viewed 13004 times
Replies: 0/0

Is it possible to highlight Friday instead of Sunday. In my country (Bangladesh) we have official holiday in Friday and Saturday.

last
Error too much recursion when using tag
2008/05/23 14:40
Viewed 6298 times
Replies: 0/0
Hi every body.
I'm developing a portlet in liferay. I want to have a textbox that is a date input.

1. Error too much recursion when using <liferay-ui:inputdate> tag:
Errors follow when I bugged by Firebug in Firefox Browser:

too much recursion
d.__msh_oldSetFullYear(y);
at calendar.js (line 1672)

In jsp file I add following line:
<%@ include file="/html/portlet/ext/hello_world/init.jsp" %>
<%@ taglib uri="http://liferay.com/tld/ui" prefix="liferay-ui" %>

Hello world!
<br/>
<liferay-ui:input-date yearRangeEnd="2010" yearRangeStart="2000"></liferay-ui:input-date>

2. I'm used dynarch calendar example in my portlet but I got same errors in session 1 above.
I've modified code to link to js in liferay:

<link rel="stylesheet" type="text/css" media="all" href="<%= themeDisplay.getPathContext() %>/html/css/skins/aqua/theme.css" title="Aqua" />
<link rel="alternate stylesheet" type="text/css" media="all" href="<%= themeDisplay.getPathContext() %>/html/css/calendar-blue.css" title="winter" />
<link rel="alternate stylesheet" type="text/css" media="all" href="<%= themeDisplay.getPathContext() %>/html/css/calendar-blue2.css" title="blue" />
<link rel="alternate stylesheet" type="text/css" media="all" href="<%= themeDisplay.getPathContext() %>/html/css/calendar-brown.css" title="summer" />
<link rel="alternate stylesheet" type="text/css" media="all" href="<%= themeDisplay.getPathContext() %>/html/css/calendar-green.css" title="green" />
<link rel="alternate stylesheet" type="text/css" media="all" href="<%= themeDisplay.getPathContext() %>/html/css/calendar-win2k-1.css" title="win2k-1" />
<link rel="alternate stylesheet" type="text/css" media="all" href="<%= themeDisplay.getPathContext() %>/html/css/calendar-win2k-2.css" title="win2k-2" />
<link rel="alternate stylesheet" type="text/css" media="all" href="<%= themeDisplay.getPathContext() %>/html/css/calendar-win2k-cold-1.css" title="win2k-cold-1" />
<link rel="alternate stylesheet" type="text/css" media="all" href="<%= themeDisplay.getPathContext() %>/html/css/calendar-win2k-cold-2.css" title="win2k-cold-2" />
<link rel="alternate stylesheet" type="text/css" media="all" href="<%= themeDisplay.getPathContext() %>/html/css/calendar-system.css" title="system" />

<!-- import the calendar script -->
<script type="text/javascript" src="<%= themeDisplay.getPathContext() %>/html/js/calendar/calendar.js"></script>

<!-- import the language module -->
<script type="text/javascript" src="<%= themeDisplay.getPathContext() %>/html/js/calendar/lang/calendar-en.js"></script>

Please help me. Thank you very much.
last
Show calendar on top
2004/10/05 03:47
Viewed 61084 times
Replies: 2/5

Hi guys!
Thanks for your wonderful job. I have your calendar implemented on several pages and it works fantastic. My only problem is that I have one calendar on a "DIV" and when it is called the calendar appears behind the "DIV". I can select it but my question is: Is there any way to make it appear "on top"?
Thx.

last
Google