| Page 1 of 2 | [ 12 posts ] | Go to page 1, 2 Next |
|
i have google'd it and searched the forum. maybe i don't know the proper terminology to search. but i want the calendar to display dates that have an entry to be highlighted when the browser loads the page. and when users scroll to different months it will show scheduled dates as well. that way visitors dont have to click everyday to see if there is an event. any help would be greatly appreciated.
|
|
You want the "selected" config option:
http://developer.yahoo.com/yui/docs/YAH ... g_selected This example does that: http://blog.davglass.com/files/yui/cal5/ |
|
thank you for such a quick response! how exactly do i implement that? which file is that code in? i am very new with this type of code. just need some direction and i can get it done! thanks again for the fast response!
|
|
This should work (haven't tested it, but it should):
ExampleClick here to see the revision history on this Gist. |
|
Hello,
I need more information about highlight dates. The selected option is not satisfactory because when i click on this cell, the highlight disappear. Is it possible to highlight a date after call.render() ? Particularly when users scroll to different months, because I have a lot of entries in a month and I don't want to preload all entries. I tried to use addRenderer function but I doesn't work when it's inside a handle event function like beforeRenderEvent or changePageEvent. Thanks for your help. |
|
Hi,
See if the following help: 1). Adding renderers, after render http://yuiblog.com/sandbox/yui/v250/exa ... erers.html 2). Avoiding scalability issues with lots of renderers http://yuiblog.com/sandbox/yui/v241/exa ... mance.html Regards, Satyen |
|
I have a similar problem - I need to only allow selection of certain dates. Is there a way to make all the dates non-selectable by default?
I created custom renderers for the dates that are allowed for selection and they work fine. I guess I need to redefine .selectable class to have no link by default and only add link in custom renderer. Is this how it should be done? |
|
If a majority of your dates are going to be "unselectable", the easiest way is to override the default cell renderer, similar to this example:
http://ericmiraglia.com/yui/demos/readonlycalendar.php Regards, Satyen |
|
sdesai wrote: If a majority of your dates are going to be "unselectable", the easiest way is to override the default cell renderer, similar to this example: http://ericmiraglia.com/yui/demos/readonlycalendar.php Yes, they are mostly empty. I tried and it is almost what I need, the only thing is that it still shows the hand icon and the current date is black on black. I guess I need to do something with styles. Do you know what do I need to do with the custom renderers in order for me to be able to fire select events? Add Style.CSS_CELL_SELECTOR ? And thanks for very quick answer! |
|
Looks like this works:
cal.renderCellDefault = function(workingDate, cell) { cell.innerHTML = this.buildDayLabel(workingDate); YAHOO.util.Dom.removeClass(cell, "selectable"); }; this makes all cells non-selectable. But when I try to add the class in my custom renderer: YAHOO.util.Dom.addClass(cell, "selectable"); it doesn't change the cell. Anything else I should do? |
| Page 1 of 2 | [ 12 posts ] | Go to page 1, 2 Next |
| You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum |
© 2006-2013 Yahoo! Inc. All rights reserved.
All code on this site is licensed under the BSD License unless stated otherwise.
About This Site · Security Contact Info
Powered by phpBB® Forum Software © phpBB Group