Skip to main content

yahoo.calendar selected cells

3 replies [Last post]
Joined: 2006-05-23


Is it possible to show yahoo.calendar widget selected cells. I tried this but it didn’t work.

Thanks in advance

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2007-07-09

Hello biso,
I was having this problem too, so i looked in the "component.js" file inside the resources/yahoo folder, this file tells the widget what to do when the calendar is created or selected, it hasn´t a way to make a day selected in the calendar, but in yahoo.developers ("") they say that there is this arg "selected" that can be pa[b][/b]ssed, but I dont know why jmaki doesn´t put this flexibility in the component. I changed a few lines in this .js file to make the Calendar accept this args, change your file, add this just after the creation of the Yahoo.widget (" YAHOO.widget.Calendar(.... ")

[b]if (wargs.args != null && wargs.args.pagedate)
if (wargs.args != null && wargs.args.selected)
this.wrapper.cfg.setProperty("selected",wargs.args.selected,false); [/b]

with this you can put 2 arguments in your calendar creation page, put the selected argument to make the calendar show your specific date at startup and you can put the "pagedate" argument too, to tell the widget to open the calendar at a specific month/year, because the selected argument doesn´t make the calendar open at the month of the selected date. use pagedate with the format "MM/yyyy".

good luck!

Joined: 2005-02-10

We would love to get contributions like this from the community. It will help us and others improve the widgets. If you are interested in contributing this code please contact me and I can help you do just that. carla dot mott at sun dot com


Joined: 2005-02-10

Hi Biso,

Are you asking if you can set the selected value when initializing the calendar? I didn't see anything in the wrapper code that allows you to do that. Please file an RFE and we can add it for the next release.