ปัญหาตอนนี้คือเลือกวันที่แล้วต้อง Click อีกครั้งถึงข้อมูลจะแสดงออกมา และ พอ click เปลี่ยนวันที่ ก็ไม่ Refresh ข้อมูลให้
$(function(){
$("#ARRIVE" ).datepicker({
dateFormat: 'yy-mm-dd',
minDate: +1,
numberOfMonths: 2,
changeMonth: true,
changeYear: true,
showOn: "both",
showButtonPanel: true
});
$("#ARRIVE").click(function () {
$('#msg').html($('#ARRIVE').val());
});
$("#DEPART").datepicker({
dateFormat: 'yy-mm-dd',
minDate: +2,
numberOfMonths: 2,
changeMonth: true,
changeYear: true,
showOn: "both",
showButtonPanel: true
});
$("#DEPART").click(function () {
$('#msg1').html($('[NAME=DEPARTCHK]').val());
});
});
ต้องการแสดงข้อมูลออกมามาหลักจากเลือกวันที่แล้ว
<h4>DEPART value : <label id="msg"></label></h4>
<h4>ARRIVE value : <label id="msg1"></label></h4>