Fixes a bug introduced in 1.6 that prevented the input field from being updated a second time.
Added Chinese translation.
Fixes a bug introduced in 1.6 that prevented the input field from being updated a second time.
Added Chinese translation.
Человек сказал: "Это средство полезно". Или русский тоже не понимаешь?
Hi, my name is Juanma, from Cádiz, Spain. I think that version is the worst version of calendar generator in the world, and I feel tired for this reason. Another cuestion; the chinesse says: Is a good tool. No chinesse, no, you are a liar. Trust in you, and you lie, because I still makes me happy send me the calendar code.
That's no good either. With the changes you've made to 1.7, you've fixed the bug where the calendar would immediately be hidden when using onSelect: function() { this.hide(); }, but you have now introduced a new bug. The date in the input field is correctly read, but the calendar is not updated to display it. Click on the trigger and nothing is selected. Hide the calendar and click on the trigger again and the correct date is selected. I have fixed this with the following:
In set: function(P, D, ar), you have the following code (1.7 only) twice:
if (!ar) { this.onChange(this); }
Replace both instances with:
if (!ar) { this.onChange(this); } else { this.cal.refresh(); }
2nd bug. When you click on the trigger, the time in the input field is correctly read by parseDate(), but not applied to the time fields. This means that when you select a date, the time in the input field is lost and changed to the default.
In l.manageFields = function(ar, P, D), replace:
aw = Calendar.parseDate(aw, at); if (aw) { this.moveTo(aw); this.selection.set(aw, false, true); }
with:
aw = Calendar.parseDate(aw, at); if (aw) { this.moveTo(aw); this.selection.set(aw, false, true); this.setTime(100 * aw.getHours() + aw.getMinutes()); }
3rd bug. If you select 00 (or 12 AM) as the hour, 12 (or 12 PM) is entered in the input field.
Replace: P = new Date(P.getFullYear(), P.getMonth(), P.getDate(), 12, 0, 0); with: P = new Date(P.getFullYear(), P.getMonth(), P.getDate(), 0, 0, 0);
Replace: var ar = new Date(D.getFullYear(), 0, 1, 12, 0, 0); with: var ar = new Date(D.getFullYear(), 0, 1, 0, 0, 0);
Replace: ar = new Date(aw, D - 1, ar, au || 12, av || 0, at || 0, P || 0); with: ar = new Date(aw, D - 1, ar, au || 0, av || 0, at || 0, P || 0);
Replace: return new Date(parseInt(D[0], 10), parseInt(D[1], 10) - 1, parseInt(D[2], 10), 12, 0, 0, 0); with: return new Date(parseInt(D[0], 10), parseInt(D[1], 10) - 1, parseInt(D[2], 10), 0, 0, 0, 0);
4th bug:
When you change the time, the input field is not updated. You need to change the time, and then click on the selected date again (or a different date) to update the field.
In l.setTime = function(au, P), replace:
if (!P) { this.callHooks("onTimeChange", this, au); }
with:
if (!P) { this.callHooks("onTimeChange", this, au); this.selection.onChange(this.selection); }
This would have been a lot easier if the file was properly formatted instead of having all the white space removed. I spent ages reformatting it properly...
I spent ages reformatting it properly... Dave, search and try a 'beautify.js'
To the creators of JSCAL... This calendar will be perfect if you fix these bugs!
I disagree with your fix for bug #4. The way you do it, every time you change the time, the calendar dissapears. While it does set the time, if you've got to go from 6:30 pm to 12:01 am, you've got a lot of clicking to do!
I found that my users commonly just clicked outside of the calendar after changing the time. I tried to train them to click the date again after changing the time, but that doesn't always work.
Solution:
in function z() {}, replace the following
if (!this.args.cont) { this.hide(); }
with this:
if (!this.args.cont) { this.selection.onChange(this.selection); this.hide(); }
Tested only in IE 8.
Other than that, your solutions to the first three bugs work great. Thanks!
Let me add that this is only if you're automatically hiding calendars on selection with an onSelect: defined in your Calendar.setup(), otherwise your solution works well enough.
how to do that I want to set the jsCalendar is disable=true? please reply me...thk
Thanks for this tool. Very useful tool especially it supports multi language.
Great work!
1.7 Has a bug when value is set, example <input name="data" type="text" id="fechahoralimite" value="2007/01/01 10:12:00" /> Date value is not capture by calendar, it shows december calendar of the year (correct is january), and when values is as example 2007/01/01 without time shoows correct month but it's not selected the day.
Занимаюсь созданием сайтов и JSCal очень сильно мне помогает с календарем на сайтах.
Software needs to work first and then be good looking. There are better options around and for free.
I am experiencing the following problem since I used The Ex-"Coolest" DHTML Calendar. I saw that when I separated the calendar (Pop up) button and text box related to it with a single space also, the Calendar stopped working, but it worked when no space was there. I managed.
Now I have a situation that I used jqueryTransform in my application. Now my textbox is in a DIV and calendar button is just next to this div. The pop up doesn't appear on click of that button. When I disable the jqTransform, it works fine.
Please help, I really do not want to compromise this time.
very awesome. i used to use the old one and this is so much cleaner and easier to use. the set-up is pretty easy too. thank you!
in FF page refresh it self every time a trigger has been pressed.
The calendar is transparent ..In EE it works fine
In this calendar when i click on button it is submit the page not open calendar in mozilla.
First of all: great work! Clean and easy to use. It would be great to have a third selection type Calendar.SEL_RANGE that alows to select exatly ONE range of dates. There are many use cases where an arbitrary set of dates is not desireable, e.g. searching within a certain time interval.
Great Job. Suggestion: enable On-the-fly change an already setupd showTime calendar propertie
Is there a way to show a drop-down for the year selection?
I noticed that if you click on the month name it will show a menu, but I have to type the date, how do I make it a drop-down instead?
This is the best FREE js calendar I've ever encountered.
Nice job!
Hello , i have the following code below , you can see that the form is activated from a button at the last field.
When the button is pressed it submites the form in both IE and FF , Is there a way to activate it through a hyperlink (image would be great) , or a way round to activate the calendar within a form that isint quite so much of a headache.
Other than thay , what a top calendar :)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link type="text/css" rel="stylesheet" href="dtp/src/css/jscal2.css" />
<script src="dtp/src/js/jscal2.js"></script>
<script src="dtp/src/js/lang/en.js"></script>
<head>
<title>Untitled Document</title>
</head>
<body>
<table width='100%' border='0' cellspacing='2' cellpadding='2'>
<h1>
Update Entity test
</h1>
<FORM METHOD=POST ACTION=''>
<tr>
<td>
TESTID =72<br>
</td>
</tr>
<td>
<INPUT TYPE=HIDDEN NAME='TESTID' value = '72'>
</td>
</tr>
<tr>
<td>
<INPUT TYPE=TEXT NAME='NAME' size='20' value = 'qwq'><br>
</td>
</tr> <tr>
<td>
<INPUT TYPE=TEXT NAME='AGE' size='22' value = '3232'><br>
</td>
</tr> <tr>
<td>
<INPUT TYPE=TEXT NAME='ADDRESS' size='80' value = 'qwq'><br>
</td>
</tr> <tr>
<td>
<INPUT TYPE=TEXT NAME='TS_UPDATED' size='7' value = '2009-05-12'>
<button id='calendar-trigger'>...</button><br>
<script>
Calendar.setup({
trigger : "calendar-trigger",
inputField : "TS_UPDATED"
});
</script>
</td>
</tr>
</table>
<INPUT INPUT type='Submit' name = 'dbCommand' value='Update'>
<INPUT INPUT type='Submit' name = 'dbCommand' value='Cancel Update'><br>
</FORM>
</table>
</body>
</html>
Can I be able to call two functions in the Calendar.setup. For Example I want both the functionalities "disabled" the dates and "onSelect". disabled is to disable the dates and onSelect is to hide the calander on selecting.
How can I do this. I tried that in the following way. But it is not working. even the calendar is not being popped up using these two funtions in the setup.
disabled_dates=[]; disabled)dates["20090814"]="true"; var cal = Calendar.setup ( { disabled : function(date) { date = Calendar.dateToInt(date); return date in disabled_dates;
}
onSelect : function(cal)
{
cal.hide();
}
}
);
Thanks in advance.
Sorry I couldnot ablr to format the code neatly.
disabled_dates=[]; disabled_dates["20090814"]="true"; var cal = Calendar.setup ( { disabled : function(date) { date = Calendar.dateToInt(date); return date in disabled_dates;
}
onSelect : function(cal)
{
cal.hide();
}
}
);
What happened with showtime in popup mode?? It's not working!
I find a bug in IE7. when I use langauge packet "cn.js" ,in firefox works well,but in ie7 doesn't work
Hi, you develloped a very good calendar. It works fine but a small problem. When the calendar script is contained in FORM, then when you click on button to display the calendar, the button send the form... This occured only under Firefox, under IE 8 it's ok.Here sample of problem :
<form name="frm" method="POST" action="test.php" onSubmit="return verif()"> <input size="30" id="f_date1" /><button id="f_btn1">...</button><br /> <input size="30" id="f_date2" /><button id="f_btn2">...</button><br /> <input size="30" id="f_date3" /><button id="f_btn3">...</button><br /> <input size="30" id="f_date4" /><button id="f_btn4">...</button>
<script type="text/javascript">//<![CDATA[
var cal = Calendar.setup({
onSelect: function(cal) { cal.hide() }
});
cal.manageFields("f_btn1", "f_date1", "%Y-%m-%d");
cal.manageFields("f_btn2", "f_date2", "%b %e, %Y");
cal.manageFields("f_btn3", "f_date3", "%e %B %Y");
cal.manageFields("f_btn4", "f_date4", "%A, %e %B, %Y");
//]]></script>
<input type="submit" value="Creer et valider l'entree" name="B1" style="float: center" />
</form>
I answer to my own question. You have to replace the script : <button id="f_btn1">...</button> by an image like this : <img src="images/arrow.png" name="f_btn1" id="f_btn1" />
and it works under IE and FF
I still don't know why html button can't work well in firefox 3.5?
I have the following setup Calendar.setup({ inputField : "enddate-input", trigger : "enddate-trigger", onSelect : function() { this.hide() }, dateFormat : "%m/%d/%Y %H:%M", date: Calendar.dateToInt(new Date()), showTime: true });
and after the first time having clicked on startdate-trigger, the calendar shown was always december for some reason.
The culprit is the for loop in parseDate function which doesnt handle spaces or empty strings.
The change is the following: in place of var aA = az[at]; You should have var aA = az[at]; aA = aA.replace(/^\s+|\s+$/g,""); if(aA == "") { continue; }
Nice, this solved the problem, thanks.
I've replaced: var aA = az[at]; by
var aA = az[at]; aA = aA.replace(/^\s+|\s+$/g,""); if(aA == "") { continue; } on the jscal2.js file.
I use version 1.7. Works great in IE8, but doesn't show at all in IE7.
Javascript Error: Line: 609 Char: 1 Error: Expected identifier, string, or number Code: 0
Remove the unnecessary comma in function, and it will work fine.
Hi,
Is there a possibility to change the selection without triggering the onSelect function?
Thx, Filipe
I try to use JSCal2-1.7. When put JSCal2-1.7 in to <form> does not work. Here is example: <body> <form id="test" name="test" method="post" action="go-to.cgi"> <p> To save memory, you can use a single (popup) calendar object to manage multiple input fields. The following sample shows you how to do it. </p>
<input size="30" id="f_date1" /><button id="f_btn1">...</button>
<script type="text/javascript">//<![CDATA[
var cal = Calendar.setup({
onSelect: function(cal) { cal.hide() }
});
cal.manageFields("f_btn1", "f_date1", "%Y-%m-%d");
//]]></script>
</form>
</body>
The widget is VERY buggy in Internet Explorer (tested 6 and 7, don't have 8). The dates, and everything in the bottom section dissappear sporadically when viewing in IE7. IE6 is even worse (sometimes not showing the widget at all).
I have tested this on 2 machines using lots of different setup() options.
I use JSCal2-1.7. It' work fine in firefox 3.0x, but in firefox 2.xx not work fine, because it display in the right outside of page.
Hi, I'm a JSCal2 user and I discovered a bug...when I set one date into the input textbox, the calendar no set this date as default selected...until the second time that is showed. Thanks.
the Calendar doesnt appear in its correct position, it appears upwards that i cant choose the date in IE 7 only i have this problem. i think most of them having this problem. i am using jscalendar-1.0
please give me idea?
the Calendar doesnt appear in its correct position, it appears upwards that i cant choose the date in IE 7 only i have this problem. i think most of them having this problem. i am using jscalendar-1.0
please give me idea?
Thanks in advance
If a date range is active (min and max set through Calendar.setup()), clicking on the trigger control the first time displays the calendar normally with the current date visible.
Select a date and then try to select a different one.
The calendar not only doesn't remember the previously set date, it also focuses on a different part of the calendar with the current value nowhere in sight.
Without a date range in effect, it works correctly, highlighting the selected date.
Hi, I have your calendar on my site, is there a bug fix available for explorer8? it works fine in safari,firefox etc but no i.e.8 if in i.e.8 you cannot set the date, if the date has been set in another browser, then try viewing the set date on the listing in i.e. it doesn't work. you have to double click on the arrow and when something happens its not as it should, the calendar is inline at the top of the page, if you have i.e.8 you can take a look and you will see what I mean, www.privatehomelets.com
Hello, I think I found a bug. Although it claims %H — hour, range 00 to 23 (24h format), if the time is something like 00:25 set on the calendar, when it is clicked, it populates the input field as 12:25
I have the same problem. Even if you set %I and %P (%I:%M %P), and you select 12:34 am, it populates 12:34 pm. Were you able to solve it?
Hi!
In php, when I use
header("Content-Type: application/xhtml+xml; charset=utf-8");
in the first row, then the calendar not working. The jscal2.js throws uncaught exception. My php file is true utf-8 (without BOM) How can I fix this problem?
Thanks for your help in advance.
More info: 1. Change the demo index.html to index.php Replace the doctype and html tag with the following code:
<?php header("Content-Type: application/xhtml+xml; charset=utf-8"); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
Thank you for your quick answer. :) As I rewrited from application/xhtml+xml to text/html... everything is goes fine. And it solved an another problem, but it is off the topic.
(When I used <?php header("Content-Type: application/xhtml+xml; charset=utf-8"); ?> then Internet explorer not knew the page or transcribed the page and tried to download it. With text/html, it is working fine.)
34k...too big
good effects, but not required
need to focus on the details rather than effects
Thanks this is a great tool and easy to use. But is there a way for me to set the pass day are not clickable?
Hi Everyone,
Firstly, thanks to Mihai Bazon for developing this Calendar. I have used DYNARCH Calendar since the first version of jscalendar 1.0, that is the old one. I am now looking to purchase a license since some sites are going commercial.
However, I am worried about some of the bugs in the latest version, and I have a suggestion as to how you can keep track of them.
Although this comments page is helpful in some regards (specifically posts #10, #13, and #44 on this page) it would be MUCH better if you had a dedicated forum to these sorts of problems, and you could probably call it "Bug Reports" and "User Fixes".
The best thing about having a forum where people can report bugs, and ALSO report on ways to fix them, is that it takes a lot of pressure off of you and your team (if there is a team?) and will cut down your development time I presume.
I have implemented all the bug fixes on this page and they have made the difference between keeping your calendar and having to find another one to purchase.
Having an organised and catalogued forum would be a valuable resource and could probably be the secret to your success! Like others said, it's a great calendar, but you should spend more time fixing the functionality rather than making it look good.
There are a number of other bugs that are still holding up development, and stopping me from purchasing a license, such as the one in post #50 regarding the 00:xx times changing to 12:xx, and the one in post #59 about firefox 2.xx browser rendering the calendar to the far right of the screen. Having to get 100+ people to upgrade to version 3.xx firefox is not only difficult, it is simply dangerous on so many fronts!
I look forward to an open forum combatting some of these bugs and I look forward to your reply Mihai.
Sincerely,
Mick
Cool, thanks for share your work. I have some problem with it: First, there are input box: <input class="text_area" type="text" name="date" id="date" size="32" maxlength="250" value="<?php echo date_format(date_create($this->item->date), 'd-m-Y H:i:s');?>">
so, the value of the input box can be: 20090918 and I have setup calendar using code: var timeInfo = {date:<?php echo date_format(date_create($this->item->date), 'Ymd');?>, time:<?php echo date_format(date_create($this->item->date), 'iH');?>}; var cal = Calendar.setup({ inputField : "date", trigger : "_calendar", dateFormat : "%d-%m-%Y %H:%M:%S", showTime : 12, date : timeInfo.date, time : timeInfo.time });
but I've no luck to get calendar pre-select date, when my date is: 20090918 the first time calendar show up with view in December then the seconds time (by click again to "trigger") it select Dec 18 2009 instead of my value Sep 18 2009.
PS: I'm using firefox 3.5.2 on Ubuntu 9.04
This tool need more compatibility with more browser... We must do something...
Really a good job, thanks ...
The sample index.html would be perfect with:
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
At least for non English languages with funny characters
what is substituted for dynarchpopupCalendar ? I know that might happend in earlier versions, but i'm following a tutorial that uses the dynarchpopupCalendar variable and it fails. What is it called now?
With the following doctype <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> the calendar would be fine under Firefox and IE.
But with the following doctype <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> the calendar has something wrong in the appearance when open by IE (6, 7, 8). Since I can't alter it, is it possible to show it correctly with this doctype declaration? Deeply thx.
I would use the onChange event. But how can I get in onChange handler the month/year?
Hi, I couldn't load a calendar within DIV tag element generated from AJAX.
Anyone could help me, please? Thnx.
Hello everyone.
First of all, congratulations for your work, i love jscal2, i thinks it's great.
Im trying to solve a bug on firefox and IE8 that shows up only on the month of october.
After picking a date, the day 2009-october-10 appears twice and all the calendar messed up.
It's not only me, the demo calendar have this problem too.
Is this actually a bug??
This problem seems to be pretty ugly.
i hope this report can help you to make jscal2 even better
Thanks a lot
Very cool tool!!
If you are interested, I can send you a dutch settings file. Just let me now where to send to...
Had the same problem as oginome, and making it worse for me is JavaFx applets worked only the other way round - only with <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">!
Is there any way I can fix this? I am hoping I don't have to look for some other calendar and waste the time I've already spent on this really nice calendar!
P.S. It does not work for latest Firefox 3.5.4 as well.
Sorry I post it 2 times...
Hi, I have some special questions please (I'm a beginner...)? How is it possible : - that each time I click a day, for example I click on 10/30/2009, this load a new page which address will be : http://www.mysite.com/10302009.html - that in this new page, the calendar is automaticaly set on 10/30/2009 ? I don't know if it's very clear ? If somebody can help me please. Thank you very much
I was hoping to get the following to show multiple dates as individual dates without ranges being shown. I tried getDates() but it doesn't seem to work all that well. Here's my code. If you have a minute would you please lend a hand.
<textarea name="class_date" id="class_date" cols="10" rows="3"></textarea><input name="calendar" type="button" id="calendar_trigger" value="..."> <script type="text/javascript"> new Calendar({ inputField: "class_date", dateFormat: "%o/%d/%Y", trigger: "calendar_trigger", selectionType: "Calendar.SEL_MULTIPLE", onSelect: function() { var date = Calendar.intToDate(this.selection.getDates()); } }); </script>
Oh, and how do you get deselection of a date to work?
Thanks, Brian
The calendar resets other input fields in the form that are not related to it.
I think there is a bug with the time, when i select a time and then click the date, I always get the good hour but "00" for the seconds. Here is my setup : var cal = Calendar.setup({ weekNumbers: true, showTime: true, onSelect: function(cal) { cal.hide() } }); cal.manageFields("f_btn1", "f_date1", "%d/%m/%Y %H:%S");
I have never been able to collect the time component of a date selected in previous versions of JSCal. How is this done with Version 1.7? Does the input tag require modification?
Thanks.
Thanks for all your hard work. This is just the ticket for my site! Rock on!
thank you for your calendar,I find it glide slow in firefox,how I can remove the glide style when click the button.thanks
I found a bug in your JSCal2-1.7 InternetExplorer 6 - Popup calendar show under select input's =(
Please'll show how to be in this case?
Hi, i've problem setting on css of my webpage: * { margin: 0; padding: 0; } I need it for better compatibility across different and older browser. Using this style (the problem is margin) firefox and chrome design the year entry to the left. To try what i'm saying just add my style to demopage.css Any solution?
Thanks
using margin: 0 auto; firefox and chrome work too, but ie6 display the arrows outside the calendar. is it possible using this calendar inside an iframe? if yes, how?
Solved. In jscal.css add "margin: 0 auto;" to ".DynarchCalendar table" class.
I'm having a little issue with the calendar... I'm sure it's something on my end but I'm hoping someone can point me in the right direction.
When my popup calendar opens, the title (the part that by default has month and year and opens the menu) is left aligned, I have not changed the code at all and all the css seems to be available to my page. I'm wondering if anyone else has experienced this or if there's anyway I can fix it.
Thanks
Ahh, yes that does work... though I wish I had tried that before asking :)
Thank you very much!
Hi for solution the bug in the dayligth twice date in October, you replace
if (y != 0 && m != -1 && d != 0) return new Date(y, m, d, hr, min, 0);
For
if (y != 0 && m != -1 && d != 0) {
var newDate = new Date();
newDate.setUTCFullYear(y);
newDate.setUTCMonth(m);
newDate.setUTCDate(d+1);
newDate.setUTCHours(hr);
newDate.setUTCMinutes(min);
newDate.setUTCSeconds(0);
return newDate;
}
It worked for me ;)
greeting from Chile
Thank you for fixing the input field update bug.
Greeting from Brazil
Hello, i want make selected dates like link when pressed new pop-up window show event on that day.How it possible?
Really great Calendar with big letter "C". To fix a bug in FF 3.5 with posting a form use <input type="button" /> instead of <button>
I added it into my free software project
I just wish the code wasn't mangled so it would be completely freedom respecting..
will let you know if it makes it into gnu.org/debian repos :-)
It was the best and it's better!!! thank you for this great work!
So great! Fantastic Calendar! Easy download... TY! Best regard and have a Happy new year! 2010 is near... 2009 is... bleaaackk!!! ^_^ From Italy
Hi, there are the bugs in FF 3.5. The calendar doesn't update date and time correctly when I call cal.manageFields("f_btn", "f_date", %d.%m.%Y %H:%M"); anw, this is awesome. Thanks. Hope that u can fix this bug. Note: it works fine in IE 8
Hi, I am using IE6, and there is a <select> tag which comes in the calendar area. The select element is coming on top of the calendar. I know that there must be some problem with the z-index. But I am unable to find the solution. I have tried by not setting any z-index, by giving a z-index value of -1 for <select>. Still this is happening. And I have to use IE6, as per client requirement. Is there any solution to this bug??
Common Guys, isn't there any solution for this. There are lot of people out there who still use IE6. My clients wants the solution in IE6. This z-index problem is bugging me.
Actually, there is a bug in IE6 when a <select> tag below the Calendar inputbox. Hope someone to solve it. Thanks.
There isnt a way to fix that in ie6. It has to do with dom elements and how select and activeX are drawn. You will have same issue if you have an activeX object there like Flash also show up on top. Only way to work around this is to make the select or flash object thats obstructing view invisible.
The calendar not working when master page of asp.net is added , but it working when regular .aspx page is taken. can u resolve this problem ?
J'ai besoin d'un calendrier pour faire des réservation comment ça se passe pour avoir une version de vôtre calendrier ?
Josué Azede
Hi, nice work, thanks.
How to make the disable function work with an array? In exemple bellow "5" would be an array:
disabled: function(date) { if (date.getDay() == 5) { return true; } else { return false; } }
This function bellow works with all weekdays, except Sunday = '0'. disabled: function(date) { if (date.getDay() == 0) { return true; } else { return false; }
Someone have an idea why this occurs? }
Thanks for the great calendar tool! Is there way to disable a range of dates without breaking them into individal days? Rather than doing: var DISABLED_DATES = { 20100122: true, 20100123: true, 20100124: true, .... }; I'd like to be able to something like:
disabled_dates[20100122-20100131];
Possible?
Thanks, Jon
I have the same problem. I managed to successfully disable a range of weekdays, now, my problem is to disable a range of dates.
This is a great js calendar. Thanks!
It would be nice if it have an OnClick event
Hi, Great work! Just couple of questions:
This is the best calendar i've ever seen.
but all the styles are so European-styled.
i hope there would be some fresh and cool styles.
来自蓝色理想观光团
from Blueidea.com
This is a great js calendar. But hope that it can contains seconds of time
when I use %y for data format, if the year is bigger than 2012, then it can't parseDate correctly. I made some changes in the source code to fix this bug. In manageFields function, I judge %y is before month and day or not, and pass it to parseDate function. In parseDate, using that parameter to parsing year, just like below:
y.parseDate = function(au, D, E, aw) { //E is true if %y is before month and day
......
if (/^[0-9]{1,2}$/.test(aA)) {
aA = parseInt(aA, 10);
ax.push(aA);
//if (aA >= 32) {
// aB = aA
//} else {
// if (aA >= 0 && aA <= 12) {
// ax.push(aA)
// } else {
// if (aA >= 1 && aA <= 31) {
// aD = aA
// }
// }
//}
} else {
P = A(aA)
}
}
}
if (E && ax.length >= 1){
aB = ax.shift()
}
if (ax.length >= 2) {
if (D) {
if (!P) {
P = ax.shift()
}
if (!aD) {
aD = ax.shift()
}
} else {
if (!aD) {
aD = ax.shift()
}
if (!P) {
P = ax.shift()
}
}
} else {
if (ax.length == 1) {
if (!aD) {
aD = ax.shift()
} else {
if (!P) {
P = ax.shift()
}
}
}
}
if (!aB && ax.length >= 1){
aB = ax.shift()
}
......
};
Thanks to Mihai, great script
I'm sure I'm doing something wrong, but the following code works ok in IE and FF, but in Chrome, clicking on the button acts like I'm submitting the form which the calendar is embedded in, and doesn't pull up the calendar at all:
<INPUT type="text" size="10" value="08/01/2009" name="date1" id="date1" onChange="updateDate(this)" onFocus="this.blur()" > <button id="date1-button">...</button> <script> Calendar.setup({ trigger : "date1-button", inputField : "date1", dateFormat : "%m/%d/%Y", max : 20100125, fdow : 0, date : 20100125, selection : [20100125], onSelect : function() { this.hide() } }); </script>
Many thanks, Jeremy
i use JScal2-1.7 but calendar' css is confused with css of MVC.net (http://www.asp.net/mvc/) . Can you tell me the way to resolve the problem.
how to implement this dynamic field calendar in the form of sending it to bring in javascript something like:
elementoInput = document.createElement("<input name='txtFin" + r + "' value='dd/mm/yyyy' id='txtFin" + r + "' maxlength='10' size='10' onClick='' onBlur='javascript:Calendar.setup({ inputField:'txtFin" + r + "', ifFormat:'%d/%m/%Y', button :''});' />");
if it works in mozilla but in Internet Explorer sends an error message syntax
I am reposting Vovan-VE said earlier, which was that when you are including the script when you are posting a form use <input type="button" /> instead of <button>
Excellent work! Let me set the min and max data dynamically according to the date of the user's computer so I tried:
var data = new Date(); var numanno, nummese, numday; numanno = data.getFullYear(); nummese = data.getMonth() + 1; numday = data.getDay() + 1;
if (nummese < 10){
nummese="0"+nummese
}
if (numday < 10){
numday="0"+numday
}
minimofrom=numanno+''+nummese+''+numday;
var cal = Calendar.setup({
min:minimofrom,
//min: 20100213,
//max: numanno+''+nummese+''numgiorno,
onSelect: function(cal) {
cal.hide();
}
});
cal.manageFields("f_btn1", "f_date1", "%Y-%m-%d");
cal.manageFields("f_btn2", "f_date2", "%b %e, %Y");
but it not work ... you have an idea why?
Massimo, tramite alert cosa ottieni da minimofrom=numanno+''+nummese+''+numday ? Poi copia il risultato e associalo direttamente alla variabile minimofrom, dicci cosa succede cosi poi verifichiamo ulteriormente, ok ;)
During the setup i set the min and max values of an inline calendar object. (ie min: 20100101 max:20101231). On my page there is a field where the user can change the year. What i would like to do is change the year of the inline calendar object and reset the run time values of min and max of that given year (ie min: 20110101 max:20111231).
I've searched fora and internet but cannot find if this is possible. Can someone get me in the right direction, or do i need to reload the page again (ie object.innerHTML = "" and do the setup again with a different date)
Thanks.
Hello it looks wonderful the new version! do you have any comments about setting it up with ASPMaker8? would be great!
Thanks,
When I use jsCal before a combobox when calendar appear the z-order is wrong.. some help?
Couldn't find how to pass variables using URL to the calendar.
Can anyone tell me how to push a pre-defined time into the calendar.
I can get the date in there and highlighted, just can't seem to get the hours and minutes in.
by Jorge Gomez:
1.7 Has a bug when value is set, example <input name="data" type="text" id="fechahoralimite" value="2007/01/01 10:12:00" /> Date value is not capture by calendar, it shows december calendar of the year (correct is january), and when values is as example 2007/01/01 without time shoows correct month but it's not selected the day.
I had a problem in FF3. When i was using only the date (11/05/2010) everything was ok but when i used the time (11/05/2010 05:26 PM) the month was lost. I looked for aw=Calendar.parseDate(aw,at); and changed the aw parameter with aw=CalendarDB.parseDate(aw.replace(/\s/g, ""),at); That little change solve my problem, and now it is working on all my browsers
Thank you very much, this is a necesary tool for website building
That was too nice to be true ! a free calendar (I came to it attracted by the "GNU" mention) with so much features. Anyway congratulations for the quality of the result.
sorry for having read too quickly the docs ! version 1.5 is free and I downloaded all the materials to make it operationnal on my site. I still have to combine the js code and php code from the previous calendar to use the mysql events database. Many thanks
Here is a picture of the painfull bug I reported earlier, maybe with some pics it will make more sense :
http://www.casimages.com/img.php?i=100407114053541426.jpg
Occurs after you selected a date, in march AND April. I guess it's the same in october, since the bug is "summer time" related.
Any chances it gets fixed ?
I'm having an issue in Firefox (newest version) works fine in IE8 but when i click on the button to trigger the calendar in my code it acts like it is submitting the form. if i take the form statement out it works fine (for showing the calendar) but can't submit the form:
(hopefully it will take the pre formatted text to make it easier to read) <pre> <form action="$PHP_SELF" method="POST"> <table style="float: left; margin: 0 1em 1em 0" border=1><tr><td> <select name=type> <option $select[detail] value=detail> Detail <option $select[pull] value=pull> Pull Stage </select>
Start Date: <input size=10 id="calendar-inputField" value="$start_date" name=start_date><button id="calendar-trigger">...</button>
End Date: <input size=10 id="calendar-inputField2" value="$end_date" name=end_date> <button id="calendar-trigger2">...</button>
<input type=submit name=submit value="Submit">
</td></tr></table>
</form>
<br>
<br>
<br>
<br>
<br>
<script type="text/javascript">
Calendar.setup({
inputField : "calendar-inputField",
trigger : "calendar-trigger",
onSelect: function() {this.hide();}
});
Calendar.setup({
inputField : "calendar-inputField2",
trigger : "calendar-trigger2",
onSelect: function() {this.hide();}
});
//</script>
</pre>
anyone have any ideas why this works in IE and not in FF? what can i do to make it work in FF?
First of all thank you for a great free control. We would like to use this in our site. But we are running into a bug with it. when we try to manually change the date in the calendar from external script it simply fails to do it.
Here is example step by step: 1) var mycal = new Calendar({...date:20090101,trigger:mytrigger,inputField:myinput......}); mycal.selection.set([20090504]); so far so good. 2) Then user clicks on the calendar to actually choose their date. 3) Down the line later we call javascript to change the selected date in the calendar so selection could begin from another date and thats where the problem is. mycal.selection.set([20090504]); mycal.redraw(); This does not work if user has chosen a date in another year.
Are we simply not setting the calendar selected date correctly?
Hi, I'm getting the same issue.
However, the right month is displayed, but not the right time, and no date is selected.
THanks for Share it With Us, greetings from Monterrey, México.
Hi all and congratulations for your great work!
I would like to display a tooltip inside the calendar itself, up to the hovered day, is it possible? In the documentation the only tooltip example show how to position tooltip on the bottom of calendar...
Thanks and best regards
这个工具很有用