| Problem ¶ | |
| Hi! I have a page generated with ajax. The page generates a code into a div, and I thought it should work, but not! My question is: this calendar is compatible with the ajax (i mean, it is a working solution or not?)? p.s: the page is: http://www.babaszemesz.hu/vizsgalat.html, sorry for the bad english | |
| last |
| Duplucate key events after alert() in IE ¶ | |
| I have an issue with the DHtml Calendar in IE6 (haven't tried IE7): after I click the About button ("?"), the keyboard events are duplicated. The first alert makes the day change twice, the second three times, and so on. Is this a known bug? Has anyone found a solution for this issue? Thanks in advance. P.S. Nice work, it's still my favorite calendar :) P.P.S. Please add a link/button for creating new threads, it's counter-intuitive having to go back to the 'root' to able to do so. | |
| last |
| returning week or month ¶ | |
| Great Widget, very cool. I have successfully setup a calendar to fill in a form field with the selected date. Has anyone coded a method of having the calendar return a selected month(and year) or week(and year) Ideally it would return the start date of the selection. TIA Paul | |
| last |
| Re: returning week or month ¶ | |
| Interesting idea, but it would probably require adding in your own event handlers for clicking other objects in the calendar that currently don't have any particular user interaction (such as clicking a week number, which currently does nothing) or overriding methods that are only internally controlled (like selecting a month from the drop list). In theory you could write your own methods to the Calendar object. There's another calendar widget out there that allows you to construct the calendar based on the type of selection you want returned: | |
| last |
| Calendar transparent ie7 ¶ | |
| I am having trouble with the calendar - only in IE7. When I activate it, it shows up transparently over the other items on the screen. The odd thing is that it is almost as if the CSS is not being read. The fonts are wrong, there are no graphics / colours, etc. (except for the main Month, year at the top which is wierd). It seems to work though. If I pick a date it is entered correctly in my input field. Note that this has been working for several years in Mozilla, ie6, opera, etc. but this is my first time testing it in ie7. I've also tried it on 2 different ie7 machines - both with the same problem. Thanks in advance for any help. | |
| last |
| Date.prototype patch-ins ¶ | |
| Just thought these might come in handy for someone. i shortened the Date.prototype.equalsTo method - i don't know if it's any faster, since it calls print(), but if someone wants to benchmark it, please follow up the results. And by the way: i used this widget two years ago on a project and it was awesome then. It's phenomenal now. Any thoughts on porting the code to any of the popular libraries like Prototype or Mootools? ** Checks date and time equality * /** Checks if current Date object is earlier than (date) -- IGNORES TIME for now */ /** Checks if current Date object is later than (date) -- IGNORES TIME for now */ | |
| last |
| Unary Function? Help! ¶ | |
| from line 1257 of calendar.js: How exactly do I set the unary function? I tried this to no avail: Help? Anyone? | |
| last |
| Re: Unary Function? Help! ¶ | |
| At 2008/02/14 18:24, trickyidiot wrote: from line 1257 of calendar.js: How exactly do I set the unary function? I tried this to no avail: Help? Anyone? "unaryFunction" is just a variable referring to a function Object passed into the setDateStatusHandler (or setDisabledHandler) method when you're setting up the calendar. Depending on which construction method you use (per the detailed documentation), your construction might look something like: var calendarSelectFunction = function(calendar, date){// Stuff to do with the calendar and date variables calendar.callCloseHandler(); } var setDisabledDatesFunction = function(date,year,month,day){return new Date() < date; // Should return FALSE until you hit tomorrow's date, // This function would also be used to determine if } var calendarCloseFunction = function(calendar){ calendar.hide(); }Calendar.setup({Notice how the functions i defined are actually assigned to variables? It makes them a lot more portable and easier to pass into other Objects (such as the options list defining the Calendar. Also notice that although the functions that the variables are assigned to accept required arguments, when you place that variable in the Calendar construction, you don't include the argument list. That's kind of the jist of a unary Function. It's just a function object, then the code inside the Calendar class makes use of that function reference later, adding the arguments to the call. If you're taking the object constructor approach [var calVariable = new Calendar()], then you SET the dateStatusFunc through a method. In this case, your set up would look more like (using the same user-defined functions as above): var cal = new Calendar(0,null,calendarSelectFunction,calendarCloseFunction); cal.setDateStatusHandler(setDisabledDatesFunction); etc. Remove the "Calendar.prototype.unaryFunction" code you added to the calendar.js file (or wherever it currently is). Construct a function that determines the status of dates, then pass the NAME OF THE FUNCTION to setDateStatusHandler() or to the property name dateStatusFunc if using Calendar.setup(). | |
| last |
| How to make sure that start date + duration = exp. date ? ¶ | |
| Hi, I am using the following function to calculate the exp.Date: function calculateExpDate(cal) { time = time + (Date.DAY * subscription) ; //set the date in the expDate field This method is invoked after changing calendar value and after choosing a dropdown value. If at first I choose the date in calendar and then duration everything is OK,the function obviously works correctly. However I have problem if at first I choose the subscription duration, then the method cannot calculate the expDate because the calendar is undefined (cal is null) And I don't know how to initialize the calendar with the value from datesBean before manually choosing the date in the calendar. The calendar is configured using "regular" setup method. My second problem is when someone changes the date manually in the input field (without choosing the calendar). How can I make aware the calendar of a new date? (And i don't want to make this field readonly). Thanks for any suggestions. Alicja | |
| last |
| Bug with special characters ¶ | |
| I encountered a subtle bug in the Date.parseDate function when using full months names in French (it probably concerns other languages with special characters) too. The behavior was the following :
After a few hours digging, I find the cause of the bug and managed to fix it... Cause of the bug :
var a = str.split(/\W+/); normal : "12 janvier 2008 à 12:00" --> ["12", "janvier", "2008", "à", "12", "00"] This behavior was found on IE7 and Firefox 2.0. I didn't test any other browser. In my particular date format it caused the index where the hour should have been contained, to contain the year ("2008") instead. So that finally, the Date object was created with an hour value of 2008, which postponed the date of about two and a half months ! Fix : replace var a = str.split(/\W+/); var reg=new RegExp("[ ,:;]+", "g"); //add other possible separators used in your date format here together with the [ ,:;] This fix is made in Calendar.js, line 1589. Maybe this can be useful and save somebody else a few hours of hair pulling sometime... Or you might even want to include the fix in the official version... Regards, Pierre Henry | |
| last |
| Calendar does not display TIME ¶ | |
| Hi Guys, I downloaded the Calendar and while the examples work great, I cannot get the TIME component to show up at all when I draw the calendar in my JSP. I just get the word TIME: and then there is a blank line after it in the calendar. My includes are as follows : and I am calling the Calendar as follows: Any help will be MUCH appreciated. | |
| last |
| Re: Calendar does not display TIME ¶ | |
| Try changing timeFormat : "24" to timeFormat : 24 without the quotes. That's what I have and it seems to work. | |
| last |
| Week numbers differ? ¶ | |
| What's going on with week numbers? For example this page: And this page: Why does this happen and how to deal with it? | |
| last |
| Calendar not defined ¶ | |
| Don't know why but I have to copy and paste all the code in calendar.js into the <head></head> tags of the .html to initialize the calendar. Otherwise I get the error "Calendar it's not defined" [IE 7] | |
| last |
| Calendar display error: mere frame w/o days (undefined content) ¶ | |
| http://r-ws.org/download/08-02-28_calendarbug.jpg Hi! I have this screenshot for you to show my problem: The calendar loads in properly, yet the actual calendar-content won't be started right. I am sure I included something wrong, can't figure out what that may be though. I used the included PHP class DHTML_calendar. I checked the includes (both stripped and un-stripped version) The same goes for the language and css file (as the screenshot shows). What else must I consider? Please help! Thanks so much!! | |
| last |














