Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP.NET4.0
hi this is pradeep i am using ajax modelpopupextender in that i am using OnClientDateSelectionChanged and onclientshown functions but i am not getting modelpopup while using OnClientDateSelectionChanged with out this i am getting modelpopup window what should i do please anyone tell me
 
here is my code
 
function calendarShown(sender, args) {
        sender._popupBehavior._element.style.zIndex = 10005;
    }
 
    function checkdate(sender, args) {
 
        if (sender._selecteddate <= new date() || sender._selecteddate > new date()) {
            alert("you cannot select a day earlier than today!");
            sender._selecteddate = new date();
           // set the date back to the current date
            sender._textbox.set_value(sender._selecteddate.format(sender._format))
 
        }
 

<asp:TextBox ID="txtenddate" runat="server"></asp:TextBox>
             <%-- <asp:ImageButton ID="ImageButton3" runat="server" ImageUrl="~/Images/calendar.gif" AlternateText="Click here to display calendar"/>--%>
                    <ajax:CalendarExtender ID="CalendarExtender2" runat="server" Format="MMMM d, yyyy"
                                            Animated="true" PopupPosition="BottomLeft" TargetControlID="txtenddate" OnClientDateSelectionChanged="checkdate"  OnClientShown="calendarShown">
                                        </ajax:CalendarExtender>
Posted 27-Nov-12 0:52am

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Add this code in page for Ajax Popup Calender
 
<asp:ScriptManager ID="ScriptManager1" runat="server">
   </asp:ScriptManager>
 

<asp:TextBox ID="TxtFdate" runat="server" Width="142px"
               ToolTip="Clict To Select Start Date" AutoPostBack="True"
               ontextchanged="TxtFdate_TextChanged"></asp:TextBox>
           <asp:CalendarExtender ID="TxtFdate_CalendarExtender" runat="server"
               Enabled="True" TargetControlID="TxtFdate" Format="yyyy-MM-dd">
  Permalink  
Comments
Susheel Kumar Verma at 20-Feb-13 6:21am
   
First u need to download ajaxtoolkit control add in your toolbox then only ajax Calender Ectender will be visible.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 290
1 Jochen Arndt 150
2 Kornfeld Eliyahu Peter 149
3 PIEBALDconsult 110
4 Richard MacCutchan 105
0 OriginalGriff 6,080
1 DamithSL 4,648
2 Maciej Los 4,087
3 Kornfeld Eliyahu Peter 3,624
4 Sergey Alexandrovich Kryukov 3,294


Advertise | Privacy | Mobile
Web03 | 2.8.141220.1 | Last Updated 20 Feb 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100