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

Trending Topics

Online now

Members online
967
Guests online
1,367
Total visitors
2,334

Forum statistics

Threads
2,273,370
Posts
28,949,048
Members
1,235,719
Latest member
Wzpprince
Back
Top