1
Step 1 : Add below input field whereever you need in .phtml file

   <div class="field street">
        <label for="date_field" class="label"><span><?= /* @escapeNotVerified */ __('License Expiration Date') ?></span></label>
        <input type="text" id="date_field" name="date_field" name="date_field">
   </div>




Step 2 : Add below script

<script>
    require([
        "jquery",
        "mage/calendar"
    ], function ($) {
        $("#date_field").calendar({
            showsTime: false,
            hideIfNoPrevNext: true,
            minDate: new Date(),
            dateFormat: 'mm/dd/yy'
        });
    });
</script>    
  • I suggest you edit your question if you want an answer – Haim Oct 31 '18 at 5:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.