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
    Oct 31, 2018 at 5:46

0

Your Answer

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

Browse other questions tagged or ask your own question.