Click here to Skip to main content
Rate this: bad
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) { = 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

<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">
Posted 27-Nov-12 0:52am

1 solution

Rate this: bad
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:TextBox ID="TxtFdate" runat="server" Width="142px"
               ToolTip="Clict To Select Start Date" AutoPostBack="True"
           <asp:CalendarExtender ID="TxtFdate_CalendarExtender" runat="server"
               Enabled="True" TargetControlID="TxtFdate" Format="yyyy-MM-dd">
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 650
1 Maciej Los 525
2 Suvendu Shekhar Giri 229
3 Sascha Lefévre 229
4 Richard Deeming 195
0 Sergey Alexandrovich Kryukov 9,693
1 OriginalGriff 9,185
2 Peter Leow 5,112
3 Kornfeld Eliyahu Peter 3,373
4 Maciej Los 2,876

Advertise | Privacy | Mobile
Web04 | 2.8.150327.1 | Last Updated 20 Feb 2013
Copyright © CodeProject, 1999-2015
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