hiii..
my concept agent wants add date backend from(6/07/2015) until(20/07/2015) these dates store in database. if agent want disable 2 days(ex. 12/07/15 , 14/07/2015) how show these dates disable in datepicker on fron end. because these 2 day agent haven't product. that's why agent wants these 2 day disable , remaining day 6 20 should enable.
please body have idea please me. thanks!!!
please refer this link. working example jquery datepicker.
please see below code.
var unavailabledates = ["9-3-2012", "14-3-2012", "15-3-2012"]; function unavailable(date) { dmy = date.getdate() + "-" + (date.getmonth() + 1) + "-" + date.getfullyear(); if ($.inarray(dmy, unavailabledates) == -1) { return [true, ""]; } else { return [false, "", "unavailable"]; } } $(function() { $("#idate").datepicker({ defaultdate: new date("3-1-2012"), dateformat: 'dd mm yy', beforeshowday: unavailable }); });
Comments
Post a Comment