have a nice date!!. In magento2 i tried set input type date and add confign min|maxDate. but is not success. Pls tell me how to set config.
this my code:
<input type="date" value="04-07-2016" class="type-date hasDatepicker mage-error" max="20-07-2016" min="20-07-2011" name="date-854" aria-invalid="true">
<script>
require(["jquery","mage/calendar", "mage/validation"],
function($){
var min = $(this).attr('min'),
max = $(this).attr('max');
$('input[type=date]').calendar({
buttonText:"<?php echo __('Select Date') ?>",
dateFormat: "dd-mm-yy",
singleClick : true,
minDate: min,
maxDate: max,
});
$('#contact-form').validation();
});
</script>