selectpicker get selected value code example
Example 1: jquery get selected option value
var selectedOptionText = $('#mySelectID').find(":selected").text();//selected option text
var selectedOptionVal = $('#mySelectID').find(":selected").val();//selected option value
Example 2: datepicker get selected date
$(function() {
$("#datepicker").datepicker();
$("#datepicker").val();
$("#datepicker").on("change",function(){
var selected = $(this).val();
alert(selected);
});
});