bootstrap-datepicker-thai
bootstrap-datepicker-thai copied to clipboard
แจ้งปัญหาตอนที่ click เลือก year ที่ ถูก disabled
เมื่อคลิ๊กปีแล้ว มันจะเอา 543 ไปลบ ทำให้ตัวเลขปีลด
เดิมหากเลือกปีได้ มันจะกลับไปหน้าเลือกเดือน แต่จังหว่ะนี้ ปี โดน disabled เอาไว้ แล้วไปกดเลือกปีนั้น script จะเอา 543 ไปลบ ทำให้ตัวเลขปีเปลี่ยน
ผมเลยแก้ bootstrap-datepicker-thai.js บรรทัด 176
จาก
var target = $(e.target).closest('span')
เป็น
var target = $(e.target).closest('span').not(".disabled")
เพื่อไม่ให้ ปีที่ถูก disabled ไปลบ 543
@9poobase รบกวน review code https://github.com/jojosati/bootstrap-datepicker-thai/pull/1 ที่เพิ่ง merge เข้าไปใหม่ ว่าแก้ปัญหาเคสนี้ได้หรือเปล่าครับ