<script type="text/javascript">
$(function() {
$('#dp_date').datepicker({
dateFormat: 'm/d/yy', minDate: 1,
beforeShowDay: $.datepicker.noWeekends
});
});
</script>
I have the following script which gets date in the future and does not show weekends.
I need to modify the above code as follows:
I have one more date stored in the php variable $ef_date which is greater than or equal to current date.
I want my datepicker to pick only dates that are greater than the $ef_date variable.
It can be equal to $ef_date only if $ef_date is greater than today’s date. Else it always has to be greater than $ef_date.
Note: An exmaple of $ef_date format is as follows:
$ef_date=03/05/2012
You can do this like:
Just do your coding here. Add some php into your javascript code or define some variables when you include your javascript.. (I hope you are familiar how to do this)
How to add data from php:
Then your calendar will look similar to this one: