Hi All
Have a RadDatePicker, which works fine.
Need only month and Year to view.
So have called up a JaVAscript function which shows date and month
It works fine in IE. In firefox nothing happens when RadDatePicker is clicked.
This is the function called in .cs page
Is there any option to rectify this.
-Anto
Have a RadDatePicker, which works fine.
Need only month and Year to view.
So have called up a JaVAscript function which shows date and month
It works fine in IE. In firefox nothing happens when RadDatePicker is clicked.
function
setCalendarTable() {
var
picker = $find(
"<%= radDate.ClientID %>"
);
var
calendar = picker.get_calendar();
var
fastNavigation = calendar._getFastNavigation();
$clearHandlers(picker.get_popupButton());
picker.get_popupButton().href =
"javascript:void(0);"
;
$addHandler(picker.get_popupButton(),
"click"
,
function
() {
var
textbox = picker.get_textBox();
//adjust where to show the popup table
var
x, y;
var
adjustElement = textbox;
if
(textbox.style.display ==
"none"
)
adjustElement = picker.get_popupImage();
var
pos = picker.getElementPosition(adjustElement);
x = pos.x;
y = pos.y + adjustElement.offsetHeight;
var
e = {
clientX: x,
clientY: y - document.documentElement.scrollTop
};
//synchronize the input date if set with the picker one
var
date = picker.get_selectedDate();
if
(date) {
calendar.get_focusedDate()[0] = date.getFullYear();
calendar.get_focusedDate()[1] = date.getMonth() + 1;
}
$get(calendar._titleID).onclick(e);
return
false
;
});
fastNavigation.OnOK =
function
() {
var
date =
new
Date(fastNavigation.Year, fastNavigation.Month, 1);
picker.get_dateInput().set_selectedDate(date);
fastNavigation.Popup.Hide();
}
fastNavigation.OnToday =
function
() {
var
date =
new
Date();
picker.get_dateInput().set_selectedDate(date);
fastNavigation.Popup.Hide();
}
}
This is the function called in .cs page
if (!IsPostBack)
{
radDate.DatePopupButton.Attributes.Add("onclick", "setCalendarTable();return false;");
radDate.SelectedDate = Convert.ToDateTime(DateTime.Now.ToString("MMMM-yyyy"));
}
Is there any option to rectify this.
-Anto