jquery run time calender date picker date changes -
i found problem, can add technology of calender user asked , extending in jquery date picker plugin custom code blocks few date on initializing date 1 plugin effects other calender plugin problem if date 15,16,17 blocked if user selects 14 start date , 18 end overlaps blocked date can see if can done stop overlapping block date , show alert here js fiddle
this complex problem
asi dint got answers here custom function can achieve this. hope helps others
//alert(datetext); var thedate = new date(date.parse($(this).datepicker('getdate'))); var maxdate = $.datepicker.formatdate('d-m-yy', thedate); var themindate = new date(date.parse($("#datepicker_1").datepicker('getdate'))); var mindate = $.datepicker.formatdate('d-m-yy', themindate); alert(mindate + "\n" + maxdate); var stamp1 = str2date(mindate).gettime(); //first date. gettime() converts integer var stamp2 = str2date(maxdate).gettime(); //second date //alert(stamp1); //alert(stamp2); for(var i=0; i<unavailabledates.length; i++){ var curstamp = str2date(unavailabledates[i]).gettime(); if(curstamp >= stamp1 && curstamp <= stamp2) //check if falls in range alert(unavailabledates[i] + " falls in range"); }
Comments
Post a Comment