Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

bootstrapmaterialdatepicker get selected value on changes

$('#drop_time, #pickup_time').bootstrapMaterialDatePicker({
  minDate: moment(),
  format: 'YYYY-MM-DD HH:mm'
});

$('#drop_time').on('change', function (selected) {
  const minDate = moment($(selected.target).val());
  $('#pickup_time').bootstrapMaterialDatePicker('setMinDate', minDate);
});
 
PREVIOUS NEXT
Tagged: #bootstrapmaterialdatepicker #selected
ADD COMMENT
Topic
Name
8+6 =