I have a RadCalendar we are using and when I add the 'OnDateSelected' Client event I have a function that adds styles and a hide() via jQuery to other elements on the page.
It seems that on the date selection the 'OnDateSelected' client event is not behaving as I thought it would be. I thought that I would be able to add a .hide() via jQuery to an element because the date selected was finished. But it seem that after the post back of the date selection my .hide() does not trigger.
What I am doing is I have a <div> that triggers my Calendar to show() via jQuery. What I want is when the date is selected I want the Calendar to .hide() via jQuery. Any help is much appreciated. Thanks.
This is my code in my .ascx control:
<ClientEvents OnDateSelected="HideCalendarEnableTimes" />
<div>Click to show Calendar</div>
<telerik:RadCalendar CssClass="myCalendar">..all the good stuff here</telerik:RadCalendar>
<option disabled class="timeListBox">List of times here</option>
//jQuery below
function HideCalendarEnableTimes(sender, eventArgs) {
// alert('enable times');
$('.timeListBox').prop('disabled', false).removeClass('disabled');
$('table.RadCalendar_Special').hide();
$('#MuseumSelectedDayBox').addClass('chosen');
}
It seems that on the date selection the 'OnDateSelected' client event is not behaving as I thought it would be. I thought that I would be able to add a .hide() via jQuery to an element because the date selected was finished. But it seem that after the post back of the date selection my .hide() does not trigger.
What I am doing is I have a <div> that triggers my Calendar to show() via jQuery. What I want is when the date is selected I want the Calendar to .hide() via jQuery. Any help is much appreciated. Thanks.
This is my code in my .ascx control:
<ClientEvents OnDateSelected="HideCalendarEnableTimes" />
<div>Click to show Calendar</div>
<telerik:RadCalendar CssClass="myCalendar">..all the good stuff here</telerik:RadCalendar>
<option disabled class="timeListBox">List of times here</option>
//jQuery below
function HideCalendarEnableTimes(sender, eventArgs) {
// alert('enable times');
$('.timeListBox').prop('disabled', false).removeClass('disabled');
$('table.RadCalendar_Special').hide();
$('#MuseumSelectedDayBox').addClass('chosen');
}