2016-05-03 3 views
0

私はSmartPluginを日付と時刻のピッカーに使用しています。すべてが設定され、動作していますが、デモにはタイムピッカーが付いていますが、テキストフィールドにはカレンダーだけが表示されます。 私のHTMLは次のように読んで:スマートフォームは、時間ピッカーでないdatepickerをポップしています

<div class="smart-wrap"> 
<div class="smart-forms smart-container wrap-2"> 

    <div class="form-header header-primary"> 
     <h4><i class="fa fa-clock-o"></i> Date Time Picker </h4> 
    </div><!-- end .form-header section --> 

    <form method="post" action="/" id="smart-form"> 
     <div class="form-body"> 
      <div class="spacer-b30"> 
       <div class="tagline"><span> Inline date-time picker </span></div><!-- .tagline --> 
      </div> 

      <div class="section cal-widget"> 
       <div class="spacer-b10"> 
        <input type="text" name="dtpfield" id="dtpfield" class="gui-input" /> 
       </div> 
       <span id="dtpicker" ></span> 
      </div><!-- end section --> 


      <div class="form-footer"> 
       <button type="submit" class="button btn-primary"> Submit Form </button> 
       <button type="reset" class="button"> Cancel </button> 
      </div><!-- end .form-footer section --> 
     </div> 
    </form> 
</div><!-- end .smart-wrap section --> 

私のjsのは、このように、あなたのコード内でTIMEFORMATを追加することによって、この

$(function() { 
    $('#dtpicker').datetimepicker({ 
     altField: "#dtpfield", 
     altFieldTimeOnly: false,     
     prevText: '<i class="fa fa-chevron-left"></i>', 
     nextText: '<i class="fa fa-chevron-right"></i>' 
    }); 
}); 

答えて

0

あなたは試してみてくださいように読める、

$(function() { 
    $('#dtpicker').datetimepicker({ 
     controlType: 'select', 
    oneLine: true, 
    timeFormat: 'hh:mm tt',     
     prevText: '<i class="fa fa-chevron-left"></i>', 
     nextText: '<i class="fa fa-chevron-right"></i>' 
    }); 
}); 
+0

作業中ではありません! –

+0

どのようなエラーが発生していますか? Press F12 –

+0

NetworkError:ネットワークエラーが発生しました。 –

関連する問題