How to set yesterday date in DatePicker using Jquery

datepicker, jquery, php

Solution

Visit the documentation: http://docs.jquery.com/UI/Datepicker#option-defaultDate

$( ".yourselector" ).datepicker({ defaultDate: -1, minDate:'-1d' });

Problem

I'm having a textbox, when user click on it calender appears.This works fine,the calender showing the current date and previous date all are disable.But now i want to show calender with yesterday date selected.How can i achieve this. for eg: if current date is `19-July-2012` then the calender must show date from `18-july-2012` and all other date before 18th must be inactive.how can I do that ? Thanks in advance.

Original source