0

Reference to Magento documentation, I want to implement "Single Date and Time Picker" mentioned in Devdocs.

enter image description here

1

2 Answers 2

0
<input name="datepicker" id="datepicker" title="datepicker" value="" type="text">
<script type="text/javascript">
    require([
        "jquery",
        "mage/calendar"
    ], function($){
        $('#datepicker').datetimepicker({
                stepMinute: 15,
                minDate: new Date(),
                dateFormat:'yy-mm-dd',
                beforeShowDay: $.datepicker.noWeekends,
                hourMin: 6,
                hourMax: 16
            }
        );
    });
</script>
0

Here's a good reference with all available settings: https://blog.chapagain.com.np/magento2-show-calendar-date-picker-field-in-custom-form/

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.

Not the answer you're looking for? Browse other questions tagged or ask your own question.