🔒 Closed Jquery datepicker

Status
Not open for further replies.

Futility

Forum Expert
help po paano makukuha yung date galing sa database tapos gagawing array para madisable yung mga dates sa datepicker...
kailangan po dynamic yung array...nagchachange yung disabled dates depende sa laman ng db...
salamat po sa sasagot!!!
 
save mo ung date mo galing sa db as array,

tapos ito ung code ng jquery



$(function() {
var disableddates = ["20-05-2015", "12-11-2014", "12-25-2014", "12-20-2014"]; //dito mo ilagay ung date galing sa db

function DisableSpecificDates(date) {
var string = jQuery.datepicker.formatDate('dd-mm-yy', date);
return [disableddates.indexOf(string) == -1];
}

$("#date").datepicker({
beforeShowDay: DisableSpecificDates
});
});
 
Status
Not open for further replies.

About this Thread

  • 5
    Replies
  • 870
    Views
  • 3
    Participants
Last reply from:
Futility

Trending Topics

Online now

Members online
699
Guests online
7,547
Total visitors
8,246

Forum statistics

Threads
2,338,693
Posts
29,305,111
Members
1,122,548
Latest member
razor mustang
Back
Top