Reputation: 745
I implemented this calendar on my website: http://www.dynarch.com/projects/calendar/doc/
I want to send the user to a link if they click on a day. The link needs to contain the day:
<div class="DynarchCalendar-day DynarchCalendar-day-selected" dyc-date="20120420" unselectable="on" dyc-type="date">20</div>
I know how to toggle an event if the user clicks on a day:
var LEFT_CAL = Calendar.setup({
cont : "cont",
fdow : 1,
dateInfo : getDateInfo,
onSelect : function() {
<!--Here-->
}
})
I can redirect the user to an other web page if they click on it:
window.location = "http://www.google.com/"
The only thing that doesn't work is that I need to add the date after the domain name. So for example:
window.location = "http://www.webpage.com?ShowDate=20120428"
Can some one show me how I can do this? The problem is that I can't get the calendar of the selected day (Class DynarchCalendar-day-selected);
Upvotes: 0
Views: 339
Reputation: 26
var LEFT_CAL = Calendar.setup({
cont: "cont",
weekNumbers: true,
selectionType: Calendar.SEL_MULTIPLE,
showTime: false,
onSelect : function() {
var selectedDate = $('td.DynarchCalendar-td-selected div').attr("dyc-date");
window.location = "http://www.webpage.com?ShowDate="+selectedDate;
}
})
Upvotes: 1