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>    
1
  • I suggest you edit your question if you want an answer
    – Haim
    Commented Oct 31, 2018 at 5:46

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.