Hello,
I have WebMonthCalendar implemented to my aspx page. Selection type is set "multi", because I want to be able to select whole weeks as date range.
I have declared OnSelectedDateChanged event for control like this :
protected void calendarMaintenance_OnSelectedDateChanged(object sender, CalendarSelectedDateChangedEventArgs e)
{
//do somethin
}
This event is fired nicely when I click day or week number in web month calendar.
My problem is now, that when week is clicked and I want to fire another event on page, this OnSelectedDateChanged event fires too. If I have first selected only one day and then try to push another button that fires postback on page, this problem does not occur.
Is this a feature or bad behaviour?
BR, Tommy
Hello Tommy,
This shouldn’t happen. Could you tell us what is your version and browser. Paste your markup code.
Thank you
Hi Hristo,
here is something >>
My browser is IE7 v7.0.6001.18000
My Infragistics is v11.1 (11.1.20111.2020) and is running on v3.5 framework
Here is essential code from the aspx page >>
<%@ Page Title="" Language="C#" MasterPageFile="~/Masters/DMSPopup.master" AutoEventWireup="true" CodeBehind="EyeCalendarMaintenance.aspx.cs" Inherits="EyeCalendarMaintenance" %>
<%@ Register Assembly="Infragistics35.Web.v11.1, Version=11.1.20111.2020, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb" Namespace="Infragistics.Web.UI.EditorControls" TagPrefix="ig" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<asp:Content ID="Content1" ContentPlaceHolderID="contentMain" runat="server">
<asp:UpdatePanel id="updatePanelCalendarMaintenance" runat="server" UpdateMode="Always">
<ContentTemplate>
<script src="../Scripts/common.js" language="javascript" type="text/javascript"></script>
................
<asp:Panel ID="pnlCalendarControl" runat="server" style="padding-top: 5px;">
<ig:WebMonthCalendar ID="calendarMaintenance" runat="server" SelectionType="Multi" StyleSetPath="~/App_Themes/WebMonthCalendar/" StyleSetName="Office2007Blue" EnableWeekNumbers="true" EnableYearDropDown="true" AutoPostBackFlags-SelectionChanged="On" OnSelectedDateChanged="calendarMaintenance_OnSelectedDateChanged"></ig:WebMonthCalendar>
</asp:Panel>
.............
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
I hope you can help me with this.
Thank you for the fast reply.
Best Regards, Tommy
I have created support ticet: CAS-74023-4WLB8Y and submitted this internally as development issue # 92793. I will link this support ticket with the development issue and you will be notified when it is resolved.
Hello Hristo,
I am not sure If I was able to describe my problem right way. I give another try.
I have web month calendar on my aspx page
I have a button on my aspx page
<asp:Button ID="btnFormatDate" runat="server" SkinID="buttonVerticalAlignMiddle" Text="Format?" OnClick="btnFormatDate_OnClick" />
Now, when I click that btnFormatDate button, I would NOT like that also OnSelectedDateChanged event is fired. That happens only when week is selected.
Thank you for the provided information.
This is the expected behavior of this control. SelectedDateChanged Event is fired when selected date in calendar was changed on client. When SelectionType Property is set to Week or Multi and the EnableWeekNumbers is enabled, then mouse click on week number will select all days in week.
Hope this helps