🔒 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
  • 759
    Views
  • 3
    Participants
Last reply from:
Futility

Trending Topics

Online now

Members online
1,064
Guests online
1,643
Total visitors
2,707

Forum statistics

Threads
2,285,176
Posts
29,028,156
Members
1,219,317
Latest member
Roninnnnn
Back
Top