javascript - Sunday only on Jquery Datepicker? -
javascript - Sunday only on Jquery Datepicker? -
aim: allow users select sunday on datpicker calendar.
currently have done, except reason every other day except sunday works. when utilize 7 sunday in code below entire calendar unclickable, other day works perfect.
$(document).ready(function() { $("#datepicker2").datepicker({ autosize: true, // automatically resize input field altformat: 'yy-mm-dd', // date format used firstday: 1, // start mon beforeshowday: function(date) { homecoming [date.getday() == 7,''];}}); // allow 1 day week });
question: how can allow sunday selection?
date.getday()
returns value in range 0-6
, not 1-7
.
beforeshowday: function(date) { homecoming [date.getday() === 0,'']; }
javascript jquery datepicker
Comments
Post a Comment