TBD.my

Full Version: Disable datepicker on form2 based on form1 selected date
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm currently using this awesome bootstrap-datetimepicker from (http://www.malot.fr/bootstrap-datetimepicker/). How to disable date on form2 based on form1 selected date??

here is my current javascript for the datetimepicker

$('.bookingfrom').datetimepicker({
language: 'en',
weekStart: 1,
todayBtn: 1,
autoclose: 1,
todayHighlight: 1,
startView: 2,
minView: 2,
startDate: '+0d',
forceParse: 0
});
$('.bookinguntil').datetimepicker({
language: 'en',
weekStart: 1,
todayBtn: 1,
autoclose: 1,
todayHighlight: 1,
startView: 2,
minView: 2,
startDate: '+0d',
forceParse: 0
});

Thank you in advance! You are awesome!
sbnarnya aku tak berapa faham soalan ko ni Hmm

nak disable camner tu?

kalau aku buat2 faham, guna if else je la kot, dan isSelected().
maksud, bila form1 da ada value, dia skip form2.

camtu ke Hmm
bukan. pernah guna jquery punya datepicker? tapi ni lain sikit. tengah documentation dia. aku ada dua borang untuk date. macam booking. booking dari dan booking hingga. sekarang bila aku dah select date kat form 1 date kt form 2 jadi limited based on apa aku pilih kat form1. contoh form 1 = 2013-12-1 jadi form 2 tak boleh pilih date less than 2013-12-1.