Click here to Skip to main content
13,046,045 members (46,163 online)
Rate this:
Please Sign up or sign in to vote.
See more:
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 26-Nov-12 23:52pm

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 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
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170713.1 | Last Updated 20 Feb 2013
Copyright © CodeProject, 1999-2017
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