0

ユーザーのために多くの試みをしましたが、前の日付を選択できませんでした。 bodyタグを閉じるとjqueryの現在の日付より前の日付を無効にし、ユーザーコントロール内にあり、ユーザーコントロールが更新チャンネルにあります

<script> 
     function pageLoad() { 
      var date_input = $('input[name="NewCostCalculator1$TextBox_deadline"]'); //our date input has the name "date" 
      var container = $('.bootstrap-iso form').length > 0 ? $('.bootstrap-iso form').parent() : "body"; 
      date_input.datepicker({ 
       format: 'dd/mm/yyyy', 
       container: container, 
       todayHighlight: true, 
       autoclose: true, 
       orientation: "left bottom", 
       minDate: 0, 
      }) 

     } 
    </script> 
である前に、私は、ブートストラップ日付ピッカーのV1.4.1以下

を使用しています 同じだがusercontrol.ascxコード

 <asp:UpdatePanel ID="mainUpdate" runat="server"> 
     <ContentTemplate> 
    <div class="col-xs-6 col-sm-6 col-md-6 col-lg-6 form-row"> 
     <asp:TextBox ID="TextBox_deadline" runat="server" ToolTip="Enter your deadline in days" ClientIDMode="Static" ValidationGroup="ordernow" CssClass="form-control date-picker" placeholder="Deadline : dd/mm/yy"></asp:TextBox>    
    </div> 
    </ContentTemplate> 
    </asp:UpdatePanel> 

とスクリプトコードのコードです

テキストボックスの日付ピッカーをクリックは、以下のように見えるの後に私を助けてください...コードの下

enter image description here

答えて

0

任意の提案は...

<script> 
      $(document).ready(function() { 
       Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler); 

       function EndRequestHandler(sender, args) { 
        var date_input = $('input[name="NewCostCalculator1$TextBox_deadline"]'); //our date input has the name "date" 
        var container = $('.bootstrap-iso form').length > 0 ? $('.bootstrap-iso form').parent() : "body"; 
        date_input.datepicker({ 
         format: 'dd/mm/yyyy', 
         container: container, 
         todayHighlight: true, 
         autoclose: true, 
         orientation: "left bottom", 
         startDate: new Date(), 
        }); 
       } 
       var date_input = $('input[name="NewCostCalculator1$TextBox_deadline"]'); //our date input has the name "date" 
       var container = $('.bootstrap-iso form').length > 0 ? $('.bootstrap-iso form').parent() : "body"; 
       date_input.datepicker({ 
        format: 'dd/mm/yyyy', 
        container: container, 
        todayHighlight: true, 
        autoclose: true, 
        orientation: "left bottom", 
        startDate: new Date(), 

       }); 
      }); 



     </script> 
を教えてください場合私の作品
関連する問題