I have fullcalendar plugin it works fine with me, the problem is: when I put it in panel with visible=false it didn't appear but when I put it in a simple panel it works fine

my code is

<div id="pnlNewRequest" visible="false" runat="server" class="portlet portlet-default">                       
         <div class="portlet-body">
                <div class="row">
                      <div class="col-md-7">
                           <div>
                              <div class="form">

                                        <div class="form-group">
                                            <div id="sandbox-container">
                                                <input class="form-control" id="txtDate" runat="server" type="text" />
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>                                
                        </div>
                        <div class="row">                               

                            <div id="CapacityDiv" class="portlet-body" runat="server">
                                <span class="label label-info">Closed</span>  </div>

                        </div>

                        <div id="calendar"></div>

                        <asp:Button Text="Save" ID="btnSaveRequest" CssClass="btn btn-lg btn-default" OnClick="btnSaveRequest_Click" runat="server" />

                        <asp:Button Text="Back" ID="btnRequestBack" OnClick="btnRequestBack_Click" CssClass="btn btn-lg btn-default" runat="server" />
                    </div>


                </div>

that what I use <div id='calendar'></div>

and in javascript I use

 $(document).ready(function () {

  $('#calendar').fullCalendar()});

My div "pnlNewRequest" will be visible on this button Click as

<asp:Button Text="Next" ID="btnAddressNext" OnClick="btnAddressNext_Click" runat="server" OnClientClick="press()" />

I tried to make JavaScript function called press() as

  function press() {
            alert("press")
            $("#calendar").fullCalendar('render');
            alert("press2")


        }

but I think it called before the button make submit

please help 3 days wasted

Related posts

Recent Viewed