Link to home
Start Free TrialLog in
Avatar of gfedz
gfedzFlag for United States of America

asked on

How to have modal popup work on specific day selection of calendar?

I have a panel open when the calendar is clicked using AJAX Modal Popup Extender, any help on how to get the panel to only open when a day is selected?
<div style="text-align:center">
        <asp:Calendar ID="myCal" runat="server" Height="600px" width="900px" BorderColor="#F2F3F4" BorderWidth="3px" DayStyle-BorderWidth="1px" 
                    TodayDayStyle-BackColor="#82CAFF" NextPrevFormat="ShortMonth" SelectionMode="Day" DayHeaderStyle-Height="30px" 
                    TitleStyle-BackColor="#CBE3F0" TitleStyle-ForeColor="#153E7E" OtherMonthDayStyle-ForeColor="#B4CFEC" NextPrevStyle-ForeColor="#2554C7">
            <DayHeaderStyle Height="30px" /><TitleStyle Height="50px" />
            <DayStyle BorderWidth="1px" HorizontalAlign="Left" VerticalAlign="Top" />
            <TodayDayStyle BackColor="#CBE3F0" />
        </asp:Calendar>
    </div>

    <asp:Panel ID="pnlSelect" runat="server" width="300px" Height="400px" CssClass="modalPopup">
        <p>Hello</p>
        <asp:LinkButton ID="lnkOK" runat="server" Text="OK" />
        <asp:LinkButton ID="lnkCancel" runat="server" Text="Cancel" />
    </asp:Panel>

    <asp:ModalPopupExtender ID="ModalPopupExtender1" runat="server" TargetControlID="myCal" PopupControlID="pnlSelect"
        BackgroundCssClass="modalBackground" DropShadow="true" OkControlID="lnkOK" CancelControlID="lnkCancel">
    </asp:ModalPopupExtender>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of meetingexpectations
meetingexpectations

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of gfedz

ASKER

Worked perfect.  I should have thought about that a little longer before wasting your time.  Thank you.