Bootstrap 4 Date Range Picker Component Example to Select Dates From Calendar in Browser Using Javascript Full Project For Beginners

 

 

Date Range Picker for Bootstrap

 

 

Improvely.com

 

 

 

About

Date range picker component for Bootstrap

 

 

<input type="text" name="datetimes" />

<script>
$(function() {
  $('input[name="datetimes"]').daterangepicker({
    timePicker: true,
    startDate: moment().startOf('hour'),
    endDate: moment().startOf('hour').add(32, 'hour'),
    locale: {
      format: 'M/DD hh:mm A'
    }
  });
});
</script>

 

 

 

 

 

<input type="text" name="birthday" value="10/24/1984" />

<script>
$(function() {
  $('input[name="birthday"]').daterangepicker({
    singleDatePicker: true,
    showDropdowns: true,
    minYear: 1901,
    maxYear: parseInt(moment().format('YYYY'),10)
  }, function(start, end, label) {
    var years = moment().diff(start, 'years');
    alert("You are " + years + " years old!");
  });
});
</script>

 

 

Leave a Reply