JQuery Datepicker Custom CSS -
i have got following code:
<script> function reserveddates(date) { var reserved = ["2014-03-03","2014-03-04","2014-03-05","2014-03-06","2014-03-07","2014-03-08","2014-03-17","2014-03-18","2014-03-19","2014-03-20","2014-03-21","2014-03-22",]; var checkoutdates = ["2014-03-09","2014-03-23",]; var string = jquery.datepicker.formatdate('yy-mm-dd', date); return [ reserved.indexof(string) == -1 ]; } $.datepicker.setdefaults($.datepicker.regional['nl']); $(function() { $( "#startdate, #enddate" ).datepicker({ beforeshowday: reserveddates, mindate: 0 }); }); </script>
which works great, can see, got second array named checkoutdates
change css of cells not disable them. have no idea how this.
i looked @ fiddle: http://jsfiddle.net/ambiguous/pjjgf/ don't know how change working me.
with little css
can work code
.ui-datepicker td { border: 1px solid #ccc; padding: 0; } .ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: solid #fff; border-width: 1px 0 0 1px; }
Comments
Post a Comment