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

Trending Topics

Online now

Members online
572
Guests online
3,674
Total visitors
4,246

Forum statistics

Threads
2,304,617
Posts
29,160,953
Members
1,196,889
Latest member
fungichiko
Back
Top