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

Trending Topics

Online now

Members online
1,109
Guests online
3,091
Total visitors
4,200

Forum statistics

Threads
2,328,768
Posts
29,244,439
Members
1,158,055
Latest member
reueldc97
Back
Top