Hi, I have this raddatepicker:
<telerik:RadDatePicker ID="datePicker" runat="server" MinDate="1900-01-01"
DateInput-Width="217px" Culture="en-GB"
DateInput-Enabled="false" Skin="Sunset" Width="247px" >
<ClientEvents OnDateSelected="getTripsAndHistory" />
<Calendar ID="Calendar3" RangeMinDate="1900-01-01" runat="server" >
</Calendar>
<DateInput Enabled="False" DisplayDateFormat="dd/MM/yyyy" DateFormat="dd/MM/yyyy"></DateInput>
<DatePopupButton ImageUrl="" HoverImageUrl=""></DatePopupButton>
</telerik:RadDatePicker>
which has <ClientEvents OnDateSelected="getTripsAndHistory" />
The problem, I need to write the event in jQuery Ready block:
(function ($) {
$(document).ready(function () {
function getTripsAndHistory(sender, eventArgs) {
var date = eventArgs.get_renderDay().get_date();
var dfi = sender.DateTimeFormatInfo;
var formattedDate = dfi.FormatDate(date, dfi.ShortDatePattern);
alert(formattedDate + " was just " +
(eventArgs.get_renderDay().get_isSelected() ? "selected. " : "unselected. "));
}
});
})(jQuery);
I am getting an error in firebug --> ReferenceError: getTripsAndHistory is not defined
How can I solve it without removing the event function from jquery ready block?
<telerik:RadDatePicker ID="datePicker" runat="server" MinDate="1900-01-01"
DateInput-Width="217px" Culture="en-GB"
DateInput-Enabled="false" Skin="Sunset" Width="247px" >
<ClientEvents OnDateSelected="getTripsAndHistory" />
<Calendar ID="Calendar3" RangeMinDate="1900-01-01" runat="server" >
</Calendar>
<DateInput Enabled="False" DisplayDateFormat="dd/MM/yyyy" DateFormat="dd/MM/yyyy"></DateInput>
<DatePopupButton ImageUrl="" HoverImageUrl=""></DatePopupButton>
</telerik:RadDatePicker>
which has <ClientEvents OnDateSelected="getTripsAndHistory" />
The problem, I need to write the event in jQuery Ready block:
(function ($) {
$(document).ready(function () {
function getTripsAndHistory(sender, eventArgs) {
var date = eventArgs.get_renderDay().get_date();
var dfi = sender.DateTimeFormatInfo;
var formattedDate = dfi.FormatDate(date, dfi.ShortDatePattern);
alert(formattedDate + " was just " +
(eventArgs.get_renderDay().get_isSelected() ? "selected. " : "unselected. "));
}
});
})(jQuery);
I am getting an error in firebug --> ReferenceError: getTripsAndHistory is not defined
How can I solve it without removing the event function from jquery ready block?