Announcement

Collapse
No announcement yet.

Custom HTML file create datetime

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Custom HTML file create datetime

    I created a custom html. It has input text inside. How can I do this in datetime?
    "datepicker" and so on did not work.

    HTML Code:
    <div class="cell col-sm-6 form-group">
        <label class="control-label"><span class="label-text">Start Date</span></label>
        <div class="input-group">
            <input class="main-element form-control datepicker" name="startdate" type="text" value="{{startDate}}" placeholder="Select date" autocomplete="off">
        </div>
    </div>

  • #2
    EspoCRM – Open Source CRM Application. Contribute to espocrm/espocrm development by creating an account on GitHub.

    Comment


    • #3
      I don't understand sorry, how do I use it in HTML?

      Comment


      • #4
        You have to initialize datepicker in js.
        https://jqueryui.com/datepicker/ (view source)

        Comment


        • #5
          Originally posted by tanya View Post
          You have to initialize datepicker in js.
          https://jqueryui.com/datepicker/ (view source)
          It's worked. Thanks.

          HTML Code:
          <script src="https://code.jquery.com/jquery-1.12.4.js"></script>
          <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
          
          <div class="row">
              <div class="cell col-sm-3 form-group">
                  <label class="control-label"><span class="label-text">Start Date</span></label>
                  <div class="input-group">
                      <input class="main-element form-control datepicker" name="startdate" type="text" value="{{startDate}}" placeholder="Tarih Seçiniz" autocomplete="off">
                  </div>
              </div>
              <div class="cell col-sm-3 form-group">
                  <label class="control-label"><span class="label-text">End Date</span></label>
                  <div class="input-group">
                      <input class="main-element form-control datepicker" name="enddate" type="text" value="{{endDate}}" placeholder="Tarih Seçiniz" autocomplete="off">
                  </div>
              </div>
          </div>
          
          <script>
              $( function() {
                $( ".datepicker" ).datepicker();
              } );
          </script>

          Comment

          Working...
          X